Skip to content

Commit 5da4010

Browse files
Enable "native_constant_invocation" CS rule
1 parent 46069ec commit 5da4010

Some content is hidden

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

52 files changed

+66
-66
lines changed

CacheWarmer/ClassCacheCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ClassCacheCacheWarmer implements CacheWarmerInterface
2828
public function __construct(array $declaredClasses = null)
2929
{
3030
if (\PHP_VERSION_ID >= 70000) {
31-
@trigger_error('The '.__CLASS__.' class is deprecated since Symfony 3.3 and will be removed in 4.0.', E_USER_DEPRECATED);
31+
@trigger_error('The '.__CLASS__.' class is deprecated since Symfony 3.3 and will be removed in 4.0.', \E_USER_DEPRECATED);
3232
}
3333

3434
$this->declaredClasses = $declaredClasses;

CacheWarmer/RouterCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct($container)
3838
$this->router = $container->get('router'); // For BC, the $router property must be populated in the constructor
3939
} elseif ($container instanceof RouterInterface) {
4040
$this->router = $container;
41-
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', RouterInterface::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
41+
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', RouterInterface::class, __CLASS__, ContainerInterface::class), \E_USER_DEPRECATED);
4242
} else {
4343
throw new \InvalidArgumentException(sprintf('"%s" only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
4444
}

CacheWarmer/TranslationsCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct($container)
3939
$this->container = $container;
4040
} elseif ($container instanceof TranslatorInterface) {
4141
$this->translator = $container;
42-
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', TranslatorInterface::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
42+
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since Symfony 3.4 and will be unsupported in version 4.0. Use a %s instead.', TranslatorInterface::class, __CLASS__, ContainerInterface::class), \E_USER_DEPRECATED);
4343
} else {
4444
throw new \InvalidArgumentException(sprintf('"%s" only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
4545
}

Command/AboutCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
8080
new TableSeparator(),
8181
['<info>PHP</>'],
8282
new TableSeparator(),
83-
['Version', PHP_VERSION],
83+
['Version', \PHP_VERSION],
8484
['Architecture', (\PHP_INT_SIZE * 8).' bits'],
8585
['Intl locale', class_exists('Locale', 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

Command/AbstractConfigCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function listBundles($output)
6262
protected function findExtension($name)
6363
{
6464
$bundles = $this->initializeBundles();
65-
$minScore = INF;
65+
$minScore = \INF;
6666

6767
foreach ($bundles as $bundle) {
6868
if ($name === $bundle->getName()) {

Command/AssetsInstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class AssetsInstallCommand extends ContainerAwareCommand
4747
public function __construct($filesystem = null)
4848
{
4949
if (!$filesystem instanceof Filesystem) {
50-
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since Symfony 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, Filesystem::class), E_USER_DEPRECATED);
50+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since Symfony 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, Filesystem::class), \E_USER_DEPRECATED);
5151

5252
parent::__construct($filesystem);
5353

Command/CacheClearCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class CacheClearCommand extends ContainerAwareCommand
4646
public function __construct($cacheClearer = null, Filesystem $filesystem = null)
4747
{
4848
if (!$cacheClearer instanceof CacheClearerInterface) {
49-
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since Symfony 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, CacheClearerInterface::class), E_USER_DEPRECATED);
49+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since Symfony 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, CacheClearerInterface::class), \E_USER_DEPRECATED);
5050

5151
parent::__construct($cacheClearer);
5252

@@ -133,7 +133,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
133133
$this->warmup($warmupDir, $realCacheDir, !$input->getOption('no-optional-warmers'));
134134

135135
if ($this->warning) {
136-
@trigger_error($this->warning, E_USER_DEPRECATED);
136+
@trigger_error($this->warning, \E_USER_DEPRECATED);
137137
$io->warning($this->warning);
138138
$this->warning = null;
139139
}

Command/CachePoolClearCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ final class CachePoolClearCommand extends ContainerAwareCommand
3636
public function __construct($poolClearer = null)
3737
{
3838
if (!$poolClearer instanceof Psr6CacheClearer) {
39-
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since Symfony 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, Psr6CacheClearer::class), E_USER_DEPRECATED);
39+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since Symfony 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, Psr6CacheClearer::class), \E_USER_DEPRECATED);
4040

4141
parent::__construct($poolClearer);
4242

Command/CacheWarmupCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CacheWarmupCommand extends ContainerAwareCommand
3636
public function __construct($cacheWarmer = null)
3737
{
3838
if (!$cacheWarmer instanceof CacheWarmerAggregate) {
39-
@trigger_error(sprintf('Passing a command name as the first argument of "%s()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
39+
@trigger_error(sprintf('Passing a command name as the first argument of "%s()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), \E_USER_DEPRECATED);
4040

4141
parent::__construct($cacheWarmer);
4242

Command/EventDispatcherDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class EventDispatcherDebugCommand extends ContainerAwareCommand
3737
public function __construct($dispatcher = null)
3838
{
3939
if (!$dispatcher instanceof EventDispatcherInterface) {
40-
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since Symfony 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, EventDispatcherInterface::class), E_USER_DEPRECATED);
40+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since Symfony 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, EventDispatcherInterface::class), \E_USER_DEPRECATED);
4141

4242
parent::__construct($dispatcher);
4343

0 commit comments

Comments
 (0)