Skip to content

Commit 79d26eb

Browse files
Enable native_constant_invocation CS fixer
1 parent f607411 commit 79d26eb

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

Command/AssetsInstallCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
143143
}
144144

145145
if ($method === $expectedMethod) {
146-
$rows[] = array(sprintf('<fg=green;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method);
146+
$rows[] = array(sprintf('<fg=green;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'OK' : "\xE2\x9C\x94" /* HEAVY CHECK MARK (U+2714) */), $message, $method);
147147
} else {
148-
$rows[] = array(sprintf('<fg=yellow;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method);
148+
$rows[] = array(sprintf('<fg=yellow;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'WARNING' : '!'), $message, $method);
149149
}
150150
} catch (\Exception $e) {
151151
$exitCode = 1;
152-
$rows[] = array(sprintf('<fg=red;options=bold>%s</>', '\\' === DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage());
152+
$rows[] = array(sprintf('<fg=red;options=bold>%s</>', '\\' === \DIRECTORY_SEPARATOR ? 'ERROR' : "\xE2\x9C\x98" /* HEAVY BALLOT X (U+2718) */), $message, $e->getMessage());
153153
}
154154
}
155155
// remove the assets of the bundles that no longer exist

Command/CacheClearCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9696
$this->warmup($warmupDir, $realCacheDir, !$input->getOption('no-optional-warmers'));
9797

9898
$filesystem->rename($realCacheDir, $oldCacheDir);
99-
if ('\\' === DIRECTORY_SEPARATOR) {
99+
if ('\\' === \DIRECTORY_SEPARATOR) {
100100
sleep(1); // workaround for Windows PHP rename bug
101101
}
102102
$filesystem->rename($warmupDir, $realCacheDir);
@@ -171,7 +171,7 @@ protected function warmup($warmupDir, $realCacheDir, $enableOptionalWarmers = tr
171171
foreach (Finder::create()->files()->depth('<2')->name($tempContainerClass.'*')->in($warmupDir) as $file) {
172172
$content = str_replace($tempContainerClass, $realContainerClass, file_get_contents($file));
173173
file_put_contents($file, $content);
174-
rename($file, str_replace(DIRECTORY_SEPARATOR.$tempContainerClass, DIRECTORY_SEPARATOR.$realContainerClass, $file));
174+
rename($file, str_replace(\DIRECTORY_SEPARATOR.$tempContainerClass, \DIRECTORY_SEPARATOR.$realContainerClass, $file));
175175
}
176176

177177
// remove temp kernel file after cache warmed up

Test/KernelTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ protected static function getPhpUnitXmlDir()
4848

4949
$dir = static::getPhpUnitCliConfigArgument();
5050
if (null === $dir &&
51-
(is_file(getcwd().DIRECTORY_SEPARATOR.'phpunit.xml') ||
52-
is_file(getcwd().DIRECTORY_SEPARATOR.'phpunit.xml.dist'))) {
51+
(is_file(getcwd().\DIRECTORY_SEPARATOR.'phpunit.xml') ||
52+
is_file(getcwd().\DIRECTORY_SEPARATOR.'phpunit.xml.dist'))) {
5353
$dir = getcwd();
5454
}
5555

Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp()
3333
{
3434
$this->fs = new Filesystem();
3535
$this->kernel = new TestAppKernel('test', true);
36-
$this->rootDir = sys_get_temp_dir().DIRECTORY_SEPARATOR.uniqid('sf2_cache_', true);
36+
$this->rootDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf2_cache_', true);
3737
$this->kernel->setRootDir($this->rootDir);
3838
$this->fs->mkdir($this->rootDir);
3939
}

Tests/Command/CacheClearCommand/Fixture/TestAppKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public function setRootDir($rootDir)
3131

3232
public function registerContainerConfiguration(LoaderInterface $loader)
3333
{
34-
$loader->load(__DIR__.DIRECTORY_SEPARATOR.'config.yml');
34+
$loader->load(__DIR__.\DIRECTORY_SEPARATOR.'config.yml');
3535
}
3636
}

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,24 +254,24 @@ public function testTranslator()
254254
$files = array_map('realpath', $options['resource_files']['en']);
255255
$ref = new \ReflectionClass('Symfony\Component\Validator\Validation');
256256
$this->assertContains(
257-
strtr(\dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
257+
strtr(\dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', \DIRECTORY_SEPARATOR),
258258
$files,
259259
'->registerTranslatorConfiguration() finds Validator translation resources'
260260
);
261261
$ref = new \ReflectionClass('Symfony\Component\Form\Form');
262262
$this->assertContains(
263-
strtr(\dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
263+
strtr(\dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', \DIRECTORY_SEPARATOR),
264264
$files,
265265
'->registerTranslatorConfiguration() finds Form translation resources'
266266
);
267267
$ref = new \ReflectionClass('Symfony\Component\Security\Core\Security');
268268
$this->assertContains(
269-
strtr(\dirname($ref->getFileName()).'/Resources/translations/security.en.xlf', '/', DIRECTORY_SEPARATOR),
269+
strtr(\dirname($ref->getFileName()).'/Resources/translations/security.en.xlf', '/', \DIRECTORY_SEPARATOR),
270270
$files,
271271
'->registerTranslatorConfiguration() finds Security translation resources'
272272
);
273273
$this->assertContains(
274-
strtr(__DIR__.'/Fixtures/translations/test_paths.en.yml', '/', DIRECTORY_SEPARATOR),
274+
strtr(__DIR__.'/Fixtures/translations/test_paths.en.yml', '/', \DIRECTORY_SEPARATOR),
275275
$files,
276276
'->registerTranslatorConfiguration() finds translation resources in custom paths'
277277
);
@@ -396,10 +396,10 @@ public function testValidationPaths()
396396
$this->assertCount(2, $xmlMappings);
397397
try {
398398
// Testing symfony/symfony
399-
$this->assertStringEndsWith('Component'.DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]);
399+
$this->assertStringEndsWith('Component'.\DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]);
400400
} catch (\Exception $e) {
401401
// Testing symfony/framework-bundle with deps=high
402-
$this->assertStringEndsWith('symfony'.DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]);
402+
$this->assertStringEndsWith('symfony'.\DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]);
403403
}
404404
$this->assertStringEndsWith('TestBundle/Resources/config/validation.xml', $xmlMappings[1]);
405405

@@ -423,10 +423,10 @@ public function testValidationPathsUsingCustomBundlePath()
423423

424424
try {
425425
// Testing symfony/symfony
426-
$this->assertStringEndsWith('Component'.DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]);
426+
$this->assertStringEndsWith('Component'.\DIRECTORY_SEPARATOR.'Form/Resources/config/validation.xml', $xmlMappings[0]);
427427
} catch (\Exception $e) {
428428
// Testing symfony/framework-bundle with deps=high
429-
$this->assertStringEndsWith('symfony'.DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]);
429+
$this->assertStringEndsWith('symfony'.\DIRECTORY_SEPARATOR.'form/Resources/config/validation.xml', $xmlMappings[0]);
430430
}
431431
$this->assertStringEndsWith('CustomPathBundle/Resources/config/validation.xml', $xmlMappings[1]);
432432

0 commit comments

Comments
 (0)