Skip to content

Commit cea6e37

Browse files
committed
MC-18031: Fix static tests
1 parent 8fe71aa commit cea6e37

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

app/code/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfig.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\PageCache\Controller\Adminhtml\PageCache;
87

8+
use Magento\Framework\App\Action\HttpGetActionInterface;
99
use Magento\Framework\App\Filesystem\DirectoryList;
1010

11-
class ExportVarnishConfig extends \Magento\Backend\App\Action
11+
/**
12+
* Class ExportVarnishConfig action which exports vcl config file
13+
*/
14+
class ExportVarnishConfig extends \Magento\Backend\App\Action implements HttpGetActionInterface
1215
{
1316
/**
1417
* Authorization level of a basic admin session

app/code/Magento/PageCache/Model/Config.php

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\PageCache\Model;
78

89
use Magento\Framework\App\ObjectManager;
@@ -12,8 +13,7 @@
1213
use Magento\PageCache\Model\Varnish\VclGeneratorFactory;
1314

1415
/**
15-
* Model is responsible for replacing default vcl template
16-
* file configuration with user-defined from configuration
16+
* Model is responsible for replacing default vcl template file configuration with user-defined from configuration
1717
*
1818
* @api
1919
* @since 100.0.2
@@ -163,14 +163,16 @@ public function getVclFile($vclTemplatePath)
163163
$sslOffloadedHeader = $this->_scopeConfig->getValue(
164164
\Magento\Framework\HTTP\PhpEnvironment\Request::XML_PATH_OFFLOADER_HEADER
165165
);
166-
$vclGenerator = $this->vclGeneratorFactory->create([
167-
'backendHost' => $this->_scopeConfig->getValue(self::XML_VARNISH_PAGECACHE_BACKEND_HOST),
168-
'backendPort' => $this->_scopeConfig->getValue(self::XML_VARNISH_PAGECACHE_BACKEND_PORT),
169-
'accessList' => $accessList ? explode(',', $accessList) : [],
170-
'designExceptions' => $designExceptions ? $this->serializer->unserialize($designExceptions) : [],
171-
'sslOffloadedHeader' => $sslOffloadedHeader,
172-
'gracePeriod' => $this->_scopeConfig->getValue(self::XML_VARNISH_PAGECACHE_GRACE_PERIOD)
173-
]);
166+
$vclGenerator = $this->vclGeneratorFactory->create(
167+
[
168+
'backendHost' => $this->_scopeConfig->getValue(self::XML_VARNISH_PAGECACHE_BACKEND_HOST),
169+
'backendPort' => $this->_scopeConfig->getValue(self::XML_VARNISH_PAGECACHE_BACKEND_PORT),
170+
'accessList' => $accessList ? explode(',', $accessList) : [],
171+
'designExceptions' => $designExceptions ? $this->serializer->unserialize($designExceptions) : [],
172+
'sslOffloadedHeader' => $sslOffloadedHeader,
173+
'gracePeriod' => $this->_scopeConfig->getValue(self::XML_VARNISH_PAGECACHE_GRACE_PERIOD)
174+
]
175+
);
174176
return $vclGenerator->generateVcl($version);
175177
}
176178

@@ -200,13 +202,12 @@ protected function _getReplacements()
200202
}
201203

202204
/**
203-
* Get IPs access list that can purge Varnish configuration for config file generation
204-
* and transform it to appropriate view
205+
* Get IPs access list allowed purge Varnish config for config file generation and transform it to appropriate view
205206
*
206-
* acl purge{
207+
* Example acl_purge{
207208
* "127.0.0.1";
208209
* "127.0.0.2";
209-
*
210+
* }
210211
* @return mixed|null|string
211212
* @deprecated 100.2.0 see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
212213
*/

app/code/Magento/PageCache/Model/Varnish/VclTemplateLocator.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
use Magento\PageCache\Model\VclTemplateLocatorInterface;
1414
use Magento\PageCache\Exception\UnsupportedVarnishVersion;
1515

16+
/**
17+
* Class VclTemplateLocator provides vcl template path
18+
*/
1619
class VclTemplateLocator implements VclTemplateLocatorInterface
1720
{
1821
/**
@@ -84,7 +87,7 @@ public function __construct(Reader $reader, ReadFactory $readFactory, ScopeConfi
8487
}
8588

8689
/**
87-
* {@inheritdoc}
90+
* @inheritdoc
8891
*/
8992
public function getTemplate($version)
9093
{

0 commit comments

Comments
 (0)