Skip to content

Commit 8a74c71

Browse files
committed
Fixed static test failures
1 parent bd0838d commit 8a74c71

File tree

4 files changed

+25
-20
lines changed

4 files changed

+25
-20
lines changed

app/code/Magento/PageCache/Console/Command/GenerateVclCommand.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,36 +29,36 @@ class GenerateVclCommand extends Command
2929
/**
3030
* Access list option name
3131
*/
32-
const ACCESS_LIST_OPTION = 'access-list';
32+
public const ACCESS_LIST_OPTION = 'access-list';
3333

3434
/**
3535
* Backend host option name
3636
*/
37-
const BACKEND_HOST_OPTION = 'backend-host';
37+
public const BACKEND_HOST_OPTION = 'backend-host';
3838

3939
/**
4040
* Backend port option name
4141
*/
42-
const BACKEND_PORT_OPTION = 'backend-port';
42+
public const BACKEND_PORT_OPTION = 'backend-port';
4343

4444
/**
4545
* Varnish version option name
4646
*/
47-
const EXPORT_VERSION_OPTION = 'export-version';
47+
public const EXPORT_VERSION_OPTION = 'export-version';
4848

4949
/**
5050
* Grace period option name
5151
*/
52-
const GRACE_PERIOD_OPTION = 'grace-period';
52+
public const GRACE_PERIOD_OPTION = 'grace-period';
5353

5454
/**
5555
* Input file option name
5656
*/
57-
const INPUT_FILE_OPTION = 'input-file';
57+
public const INPUT_FILE_OPTION = 'input-file';
5858
/**
5959
* Output file option name
6060
*/
61-
const OUTPUT_FILE_OPTION = 'output-file';
61+
public const OUTPUT_FILE_OPTION = 'output-file';
6262

6363
/**
6464
* @var \Magento\Framework\Filesystem\Directory\WriteFactory
@@ -222,6 +222,8 @@ private function getOptionList()
222222
}
223223

224224
/**
225+
* Input vcl params
226+
*
225227
* @param InputInterface $input
226228
* @return array
227229
*/

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,32 @@ class VclTemplateLocator implements VclTemplateLocatorInterface
2222
/**
2323
* XML path to Varnish 5 config template path
2424
*/
25-
const VARNISH_6_CONFIGURATION_PATH = 'system/full_page_cache/varnish6/path';
25+
public const VARNISH_6_CONFIGURATION_PATH = 'system/full_page_cache/varnish6/path';
2626

2727
/**
2828
* XML path to Varnish 5 config template path
2929
*/
30-
const VARNISH_5_CONFIGURATION_PATH = 'system/full_page_cache/varnish5/path';
30+
public const VARNISH_5_CONFIGURATION_PATH = 'system/full_page_cache/varnish5/path';
3131

3232
/**
3333
* XML path to Varnish 4 config template path
3434
*/
35-
const VARNISH_4_CONFIGURATION_PATH = 'system/full_page_cache/varnish4/path';
35+
public const VARNISH_4_CONFIGURATION_PATH = 'system/full_page_cache/varnish4/path';
3636

3737
/**
3838
* Varnish 4 supported version
3939
*/
40-
const VARNISH_SUPPORTED_VERSION_4 = '4';
40+
public const VARNISH_SUPPORTED_VERSION_4 = '4';
4141

4242
/**
4343
* Varnish 5 supported version
4444
*/
45-
const VARNISH_SUPPORTED_VERSION_5 = '5';
45+
public const VARNISH_SUPPORTED_VERSION_5 = '5';
4646

4747
/**
4848
* Varnish 6 supported version
4949
*/
50-
const VARNISH_SUPPORTED_VERSION_6 = '6';
50+
public const VARNISH_SUPPORTED_VERSION_6 = '6';
5151

5252
/**
5353
* @var array
@@ -86,8 +86,12 @@ class VclTemplateLocator implements VclTemplateLocatorInterface
8686
* @param ScopeConfigInterface $scopeConfig
8787
* @param DirectoryList $directoryList
8888
*/
89-
public function __construct(Reader $reader, ReadFactory $readFactory, ScopeConfigInterface $scopeConfig, DirectoryList $directoryList)
90-
{
89+
public function __construct(
90+
Reader $reader,
91+
ReadFactory $readFactory,
92+
ScopeConfigInterface $scopeConfig,
93+
DirectoryList $directoryList
94+
) {
9195
$this->reader = $reader;
9296
$this->readFactory = $readFactory;
9397
$this->scopeConfig = $scopeConfig;
@@ -99,9 +103,8 @@ public function __construct(Reader $reader, ReadFactory $readFactory, ScopeConfi
99103
*/
100104
public function getTemplate($version, $inputFile = null)
101105
{
102-
if (is_null($inputFile)) {
103-
$moduleEtcPath = $this->reader->getModuleDir(Dir::MODULE_ETC_DIR,
104-
'Magento_PageCache');
106+
if ($inputFile === null) {
107+
$moduleEtcPath = $this->reader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_PageCache');
105108
$configFilePath = $moduleEtcPath . '/' . $this->scopeConfig->getValue($this->getVclTemplatePath($version));
106109
$directoryRead = $this->readFactory->create($moduleEtcPath);
107110
$configFilePath = $directoryRead->getRelativePath($configFilePath);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface VclGeneratorInterface
1616
* Return generated varnish.vcl configuration file
1717
*
1818
* @param int $version
19-
* $param string $inputFile
19+
* @param string $inputFile
2020
* @return string
2121
* @since 100.2.0
2222
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\PageCache\Exception\UnsupportedVarnishVersion;
1010

1111
/**
12-
* Vcl template locator interface
12+
* Vcl template locator
1313
*
1414
* @api
1515
* @since 100.2.0

0 commit comments

Comments
 (0)