8000 minor #46788 CS fixes (nicolas-grekas) · symfony/symfony@0c38f36 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c38f36

Browse files
minor #46788 CS fixes (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- CS fixes | Q | A | ------------- | --- | Branch? | 4. | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - I generated this using the latest version of php-cs-fixer after spotting new changes that fabbot generates. Note that I had to revert many changes done by php-cs-fixer. Looks like it have some rough edges at the moment. Commits ------- 76f5031 CS fixes
2 parents 8f9b736 + 76f5031 commit 0c38f36

File tree

171 files changed

+456
-456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+456
-456
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheD
345345
$container->setDefinition($this->getObjectManagerElementName(sprintf('%s_memcached_instance', $objectManagerName)), $memcachedInstance);
346346
$cacheDef->addMethodCall('setMemcached', [new Reference($this->getObjectManagerElementName(sprintf('%s_memcached_instance', $objectManagerName)))]);
347347
break;
348-
case 'redis':
348+
case 'redis':
349349
$redisClass = !empty($cacheDriver['class']) ? $cacheDriver['class'] : '%'.$this->getObjectManagerElementName('cache.redis.class').'%';
350350
$redisInstanceClass = !empty($cacheDriver['instance_class']) ? $cacheDriver['instance_class'] : '%'.$this->getObjectManagerElementName('cache.redis_instance.class').'%';
351351
$redisHost = !empty($cacheDriver['host']) ? $cacheDriver['host'] : '%'.$this->getObjectManagerElementName('cache.redis_host').'%';

src/Symfony/Bridge/Doctrine/PropertyInfo/DoctrineExtractor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,16 @@ public function getTypes($class, $property, array $context = [])
114114
$fieldName = $associationMapping['indexBy'];
115115
if (null === ($typeOfField = $subMetadata->getTypeOfField($fieldName))) {
116116
$fieldName = $subMetadata->getFieldForColumn($associationMapping['indexBy']);
117-
//Not a property, maybe a column name?
117+
// Not a property, maybe a column name?
118118
if (null === ($typeOfField = $subMetadata->getTypeOfField($fieldName))) {
119-
//Maybe the column name is the association join column?
119+
// Maybe the column name is the association join column?
120120
$associationMapping = $subMetadata->getAssociationMapping($fieldName);
121121

122122
/** @var ClassMetadataInfo $subMetadata */
123123
$indexProperty = $subMetadata->getSingleAssociationReferencedJoinColumnName($fieldName);
124124
$subMetadata = $this->entityManager ? $this->entityManager->getClassMetadata($associationMapping['targetEntity']) : $this->classMetadataFactory->getMetadataFor($associationMapping['targetEntity']);
125125

126-
//Not a property, maybe a column name?
126+
// Not a property, maybe a column name?
127127
if (null === ($typeOfField = $subMetadata->getTypeOfField($indexProperty))) {
128128
$fieldName = $subMetadata->getFieldForColumn($indexProperty);
129129
$typeOfField = $subMetadata->getTypeOfField($fieldName);

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ public function testExtractEnum()
185185
}
186186
$this->assertEquals([new Type(Type::BUILTIN_TYPE_OBJECT, false, EnumString::class)], $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumString', []));
187187
$this->assertEquals([new Type(Type::BUILTIN_TYPE_OBJECT, false, EnumInt::class)], $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumInt', []));
188-
$this->assertEquals(null, $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumStringArray', []));
188+
$this->assertNull($this->createExtractor()->getTypes(DoctrineEnum::class, 'enumStringArray', []));
189189
$this->assertEquals([new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), new Type(Type::BUILTIN_TYPE_OBJECT, false, EnumInt::class))], $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumIntArray', []));
190-
$this->assertEquals(null, $this->createExtractor()->getTypes(DoctrineEnum::class, 'enumCustom', []));
190+
$this->assertNull($this->createExtractor()->getTypes(DoctrineEnum::class, 'enumCustom', []));
191191
}
192192

193193
public function typesProvider()

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@
6666
$phpunitConfigFilename = $phpunitConfigFilename ?: $getPhpUnitConfig('phpunit.xml');
6767

6868
if ($phpunitConfigFilename) {
69-
$phpunitConfig = new DomDocument();
69+
$phpunitConfig = new DOMDocument();
7070
$phpunitConfig->load($phpunitConfigFilename);
7171
} else {
7272
$phpunitConfig = false;
7373
}
7474
}
7575
if (false !== $phpunitConfig) {
76-
$var = new DOMXpath($phpunitConfig);
76+
$var = new DOMXPath($phpunitConfig);
7777
foreach ($var->query('//php/server[@name="'.$name.'"]') as $var) {
7878
return $var->getAttribute('value');
7979
}

src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CodeExtension extends AbstractExtension
3535
*/
3636
public function __construct($fileLinkFormat, string $projectDir, string $charset)
3737
{
38-
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
38+
$this->fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
3939
$this->projectDir = str_replace('\\', '/', $projectDir).'/';
4040
$this->charset = $charset;
4141
}
@@ -241,7 +241,7 @@ public function formatLogMessage(string $message, array $context): string
241241
if ($context && str_contains($message, '{')) {
242242
$replacements = [];
243243
foreach ($context as $key => $val) {
244-
if (is_scalar($val)) {
244+
if (\is_scalar($val)) {
245245
$replacements['{'.$key.'}'] = $val;
246246
}
247247
}

src/Symfony/Bridge/Twig/Tests/Node/FormThemeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testCompile()
6464
sprintf(
6565
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [0 => "tpl1", 1 => "tpl2"], true);',
6666
$this->getVariableGetter('form')
67-
),
67+
),
6868
trim($compiler->compile($node)->getSource())
6969
);
7070

@@ -74,7 +74,7 @@ public function testCompile()
7474
sprintf(
7575
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, [0 => "tpl1", 1 => "tpl2"], false);',
7676
$this->getVariableGetter('form')
77-
),
77+
),
7878
trim($compiler->compile($node)->getSource())
7979
);
8080

@@ -86,7 +86,7 @@ public function testCompile()
8686
sprintf(
8787
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, "tpl1", true);',
8888
$this->getVariableGetter('form')
89-
),
89+
),
9090
trim($compiler->compile($node)->getSource())
9191
);
9292

@@ -96,7 +96,7 @@ public function testCompile()
9696
sprintf(
9797
'$this->env->getRuntime("Symfony\\\\Component\\\\Form\\\\FormRenderer")->setTheme(%s, "tpl1", false);',
9898
$this->getVariableGetter('form')
99-
),
99+
),
100100
trim($compiler->compile($node)->getSource())
101101
);
102102
}

src/Symfony/Bridge/Twig/Tests/Node/SearchAndRenderBlockNodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testCompileWidget()
3838
sprintf(
3939
'$this->env->getRuntime(\'Symfony\Component\Form\FormRenderer\')->searchAndRenderBlock(%s, \'widget\')',
4040
$this->getVariableGetter('form')
41-
),
41+
),
4242
trim($compiler->compile($node)->getSource())
4343
);
4444
}

src/Symfony/Bridge/Twig/Tests/Node/TransNodeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public function testCompileStrict()
3838
'echo $this->env->getExtension(\'Symfony\Bridge\Twig\Extension\TranslationExtension\')->trans("trans %%var%%", array_merge(["%%var%%" => %s], %s), "messages");',
3939
$this->getVariableGetterWithoutStrictCheck('var'),
4040
$this->getVariableGetterWithStrictCheck('foo')
41-
),
42-
trim($compiler->compile($node)->getSource())
41+
),
42+
trim($compiler->compile($node)->getSource())
4343
);
4444
}
4545

src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8484
['Architecture', (\PHP_INT_SIZE * 8).' bits'],
8585
['Intl locale', class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a'],
8686
['Timezone', date_default_timezone_get().' (<comment>'.(new \DateTime())->format(\DateTime::W3C).'</>)'],
87-
['OPcache', \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
88-
['APCu', \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
87+
['OPcache', \extension_loaded('Zend OPcache') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
88+
['APCu', \extension_loaded('apcu') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) ? 'true' : 'false'],
8989
['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'],
9090
];
9191

src/Symfony/Bundle/FrameworkBundle/Command/XliffLintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ protected function configure()
5757
<info>php %command.full_name% @AcmeDemoBundle</info>
5858

5959
EOF
60-
);
60+
);
6161
}
6262
}

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public function load(array $configs, ContainerBuilder $container)
227227
// mark any env vars found in the ide setting as used
228228
$container->resolveEnvPlaceholders($ide);
229229

230-
$container->setParameter('templating.helper.code.file_link_format', str_replace('%', '%%', ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')) ?: ($links[$ide] ?? $ide));
230+
$container->setParameter('templating.helper.code.file_link_format', str_replace('%', '%%', \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format')) ?: ($links[$ide] ?? $ide));
231231
}
232232
$container->setParameter('debug.file_link_format', '%templating.helper.code.file_link_format%');
233233
}
@@ -719,7 +719,7 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
719719
$markingStoreDefinition = new ChildDefinition('workflow.marking_store.'.$workflow['marking_store']['type']);
720720
if ('method' === $workflow['marking_store']['type']) {
721721
$markingStoreDefinition->setArguments([
722-
'state_machine' === $type, //single state
722+
'state_machine' === $type, // single state
723723
$workflow['marking_store']['property'] ?? 'marking',
724724
]);
725725
} else {

src/Symfony/Bundle/FrameworkBundle/Routing/Router.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@ private function resolve($value)
178178

179179
$resolved = ($this->paramFetcher)($match[1]);
180180

181-
if (is_scalar($resolved)) {
181+
if (\is_scalar($resolved)) {
182182
$this->collectedParameters[$match[1]] = $resolved;
183183

184184
if (\is_string($resolved)) {
185185
$resolved = $this->resolve($resolved);
186186
}
187187

188-
if (is_scalar($resolved)) {
188+
if (\is_scalar($resolved)) {
189189
return false === $resolved ? '0' : (string) $resolved;
190190
}
191191
}

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CodeHelper extends Helper
3636
*/
3737
public function __construct($fileLinkFormat, string $projectDir, string $charset)
3838
{
39-
$this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
39+
$this->fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
4040
$this->rootDir = str_replace('\\', '/', $projectDir).'/';
4141
$this->charset = $charset;
4242
}

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ public function testAnnotations()
10091009

10101010
public function testFileLinkFormat()
10111011
{
1012-
if (ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
1012+
if (\ini_get('xdebug.file_link_format') || get_cfg_var('xdebug.file_link_format')) {
10131013
$this->markTestSkipped('A custom file_link_format is defined.');
10141014
}
10151015

src/Symfony/Bundle/WebServerBundle/Command/ServerRunCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
143143
$message = sprintf('Server listening on all interfaces, port %s -- see http://%s', $config->getPort(), $displayAddress);
144144
}
145145
$io->success($message);
146-
if (ini_get('xdebug.profiler_enable_trigger')) {
146+
if (\ini_get('xdebug.profiler_enable_trigger')) {
147147
$io->comment('Xdebug profiler trigger enabled.');
148148
}
149149
$io->comment('Quit the server with CONTROL-C.');

src/Symfony/Bundle/WebServerBundle/Command/ServerStartCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
154154
$message = sprintf('Server listening on all interfaces, port %s -- see http://%s', $config->getPort(), $displayAddress);
155155
}
156156
$io->success($message);
157-
if (ini_get('xdebug.profiler_enable_trigger')) {
157+
if (\ini_get('xdebug.profiler_enable_trigger')) {
158158
$io->comment('Xdebug profiler trigger enabled.');
159159
}
160160
}

src/Symfony/Bundle/WebServerBundle/WebServer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private function createServerProcess(WebServerConfig $config): Process
156156
throw new \RuntimeException('Unable to find the PHP binary.');
157157
}
158158

159-
$xdebugArgs = ini_get('xdebug.profiler_enable_trigger') ? ['-dxdebug.profiler_enable_trigger=1'] : [];
159+
$xdebugArgs = \ini_get('xdebug.profiler_enable_trigger') ? ['-dxdebug.profiler_enable_trigger=1'] : [];
160160

161161
$process = new Process(array_merge([$binary], $finder->findArguments(), $xdebugArgs, ['-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()]));
162162
$process->setWorkingDirectory($config->getDocumentRoot());

src/Symfony/Component/Cache/Adapter/AbstractAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static function createSystemCache($namespace, $defaultLifetime, $version,
117117
return $opcache;
118118
}
119119

120-
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
120+
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
121121
return $opcache;
122122
}
123123

src/Symfony/Component/Cache/Adapter/ChainAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(array $adapters, int $defaultLifetime = 0)
5151
if (!$adapter instanceof CacheItemPoolInterface) {
5252
throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', \get_class($adapter), CacheItemPoolInterface::class));
5353
}
54-
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $adapter instanceof ApcuAdapter && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
54+
if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $adapter instanceof ApcuAdapter && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
5555
continue; // skip putting APCu in the chain when the backend is disabled
5656
}
5757

src/Symfony/Component/Cache/CacheItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public static function log(?LoggerInterface $logger, string $message, array $con
194194
} else {
195195
$replace = [];
196196
foreach ($context as $k => $v) {
197-
if (is_scalar($v)) {
197+
if (\is_scalar($v)) {
198198
$replace['{'.$k.'}'] = $v;
199199
}
200200
}

src/Symfony/Component/Cache/Tests/Adapter/AdapterTestCase.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,19 @@ public function testDontSaveWhenAskedNotTo()
106106

107107
$cache = $this->createCachePool(0, __FUNCTION__);
108108

109-
$v1 = $cache->get('some-key', function($item, &$save){
110-
$save = false;
111-
return 1;
109+
$v1 = $cache->get('some-key', function ($item, &$save) {
110+
$save = false;
111+
112+
return 1;
112113
});
113114
$this->assertSame($v1, 1);
114115

115-
$v2 = $cache->get('some-key', function(){
116+
$v2 = $cache->get('some-key', function () {
116117
return 2;
117118
});
118119
$this->assertSame($v2, 2, 'First value was cached and should not have been');
119120

120-
$v3 = $cache->get('some-key', function(){
121+
$v3 = $cache->get('some-key', function () {
121122
$this->fail('Value should have come from cache');
122123
});
123124
$this->assertSame($v3, 2);

src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class ApcuAdapterTest extends AdapterTestCase
2525

2626
public function createCachePool(int $defaultLifetime = 0): CacheItemPoolInterface
2727
{
28-
if (!\function_exists('apcu_fetch') || !filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN)) {
28+
if (!\function_exists('apcu_fetch') || !filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN)) {
2929
$this->markTestSkipped('APCu extension is required.');
3030
}
31-
if ('cli' === \PHP_SAPI && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
31+
if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
3232
if ('testWithCliSapi' !== $this->getName()) {
3333
$this->markTestSkipped('apc.enable_cli=1 is required.');
3434
}

src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function provideServersSetting(): iterable
148148
'localhost',
149149
11222,
150150
];
151-
if (filter_var(ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
151+
if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
152152
yield [
153153
'memcached://user:password@127.0.0.1?weight=50',
154154
'127.0.0.1',
@@ -165,7 +165,7 @@ public function provideServersSetting(): iterable
165165
'/var/local/run/memcached.socket',
166166
0,
167167
];
168-
if (filter_var(ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
168+
if (filter_var(\ini_get('memcached.use_sasl'), \FILTER_VALIDATE_BOOLEAN)) {
169169
yield [
170170
'memcached://user:password@/var/local/run/memcached.socket?weight=25',
171171
'/var/local/run/memcached.socket',

src/Symfony/Component/Cache/Tests/Adapter/TagAwareAdapterTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function testHasItemReturnsFalseWhenPoolDoesNotHaveItemTags()
123123
$anotherPool = $this->createCachePool();
124124

125125
$adapter = new FilesystemAdapter();
126-
$adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); //simulate item losing tags pair
126+
$adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); // simulate item losing tags pair
127127

128128
$this->assertFalse($anotherPool->hasItem($itemKey));
129129
}
@@ -139,7 +139,7 @@ public function testGetItemReturnsCacheMissWhenPoolDoesNotHaveItemTags()
139139
$anotherPool = $this->createCachePool();
140140

141141
$adapter = new FilesystemAdapter();
142-
$adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); //simulate item losing tags pair
142+
$adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); // simulate item losing tags pair
143143

144144
$item = $anotherPool->getItem($itemKey);
145145
$this->assertFalse($item->isHit());
@@ -156,7 +156,7 @@ public function testHasItemReturnsFalseWhenPoolDoesNotHaveItemAndOnlyHasTags()
156156
$anotherPool = $this->createCachePool();
157157

158158
$adapter = new FilesystemAdapter();
159-
$adapter->deleteItem($itemKey); //simulate losing item but keeping tags
159+
$adapter->deleteItem($itemKey); // simulate losing item but keeping tags
160160

161161
$this->assertFalse($anotherPool->hasItem($itemKey));
162162
}
@@ -191,7 +191,7 @@ public function testGetItemReturnsCacheMissWhenPoolDoesNotHaveItemAndOnlyHasTags
191191
$anotherPool = $this->createCachePool();
192192

193193
$adapter = new FilesystemAdapter();
194-
$adapter->deleteItem($itemKey); //simulate losing item but keeping tags
194+
$adapter->deleteItem($itemKey); // simulate losing item but keeping tags
195195

196196
$item = $anotherPool->getItem($itemKey);
197197
$this->assertFalse($item->isHit());

src/Symfony/Component/Cache/Tests/Simple/ApcuCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ApcuCacheTest extends CacheTestCase
2727

2828
public function createSimpleCache(int $defaultLifetime = 0): CacheInterface
2929
{
30-
if (!\function_exists('apcu_fetch') || !filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) || ('cli' === \PHP_SAPI && !filter_var(ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) {
30+
if (!\function_exists('apcu_fetch') || !filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN) || ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) {
3131
$this->markTestSkipped('APCu extension is required.');
3232
}
3333
if ('\\' === \DIRECTORY_SEPARATOR) {

0 commit comments

Comments
 (0)
0