8000 Fix CS · symfony/symfony@a3e49f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit a3e49f3

Browse files
committed
Fix CS
1 parent ce29631 commit a3e49f3

File tree

49 files changed

+91
-91
lines changed

Some content is hidden

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

49 files changed

+91
-91
lines changed

src/Symfony/Bridge/Doctrine/Form/EventListener/MergeDoctrineCollectionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function onSubmit(FormEvent $event)
7373
*/
7474
public function onBind(FormEvent $event)
7575
{
76-
if (__CLASS__ === \get_class($this)) {
76+
if (__CLASS__ === static::class) {
7777
$this->bc = false;
7878
} else {
7979
// parent::onBind() has been called

src/Symfony/Bridge/Twig/Command/DebugCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
104104
$decorated = $io->isDecorated();
105105

106106
// BC to be removed in 4.0
107-
if (__CLASS__ !== \get_class($this)) {
107+
if (__CLASS__ !== static::class) {
108108
$r = new \ReflectionMethod($this, 'getTwigEnvironment');
109109
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
110-
@trigger_error(sprintf('Usage of method "%s" is deprecated since Symfony 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', \get_class($this).'::getTwigEnvironment'), E_USER_DEPRECATED);
110+
@trigger_error(sprintf('Usage of method "%s" is deprecated since Symfony 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', static::class.'::getTwigEnvironment'), E_USER_DEPRECATED);
111111

112112
$this->twig = $this->getTwigEnvironment();
113113
}

src/Symfony/Bridge/Twig/Command/LintCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
105105
$io = new SymfonyStyle($input, $output);
106106

107107
// BC to be removed in 4.0
108-
if (__CLASS__ !== \get_class($this)) {
108+
if (__CLASS__ !== static::class) {
109109
$r = new \ReflectionMethod($this, 'getTwigEnvironment');
110110
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
111-
@trigger_error(sprintf('Usage of method "%s" is deprecated since Symfony 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', \get_class($this).'::getTwigEnvironment'), E_USER_DEPRECATED);
111+
@trigger_error(sprintf('Usage of method "%s" is deprecated since Symfony 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', static::class.'::getTwigEnvironment'), E_USER_DEPRECATED);
112112

113113
$this->twig = $this->getTwigEnvironment();
114114
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ protected function createContainer(array $data = [])
11411141

11421142
protected function createContainerFromFile($file, $data = [], $resetCompilerPasses = true, $compile = true)
11431143
{
1144-
$cacheKey = md5(\get_class($this).$file.serialize($data));
1144+
$cacheKey = md5(static::class.$file.serialize($data));
11451145
if ($compile && isset(self::$containerCache[$cacheKey])) {
11461146
return self::$containerCache[$cacheKey];
11471147
}

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AbstractWebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ protected static function createKernel(array $options = [])
6868

6969
protected static function getVarDir()
7070
{
71-
return 'FB'.substr(strrchr(\get_called_class(), '\\'), 1);
71+
return 'FB'.substr(strrchr(static::class, '\\'), 1);
7272
}
7373
}

src/Symfony/Bundle/SecurityBundle/Tests/Functional/AbstractWebTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ protected static function createKernel(array $options = [])
6868

6969
protected static function getVarDir()
7070
{
71-
return 'SB'.substr(strrchr(\get_called_class(), '\\'), 1);
71+
return 'SB'.substr(strrchr(static::class, '\\'), 1);
7272
}
7373
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testUnserializable()
5454

5555
public function testVersion()
5656
{
57-
$namespace = str_replace('\\', '.', \get_class($this));
57+
$namespace = str_replace('\\', '.', static::class);
5858

5959
$pool1 = new ApcuAdapter($namespace, 0, 'p1');
6060

@@ -79,7 +79,7 @@ public function testVersion()
7979

8080
public function testNamespace()
8181
{
82-
$namespace = str_replace('\\', '.', \get_class($this));
82+
$namespace = str_replace('\\', '.', static::class);
8383

8484
$pool1 = new ApcuAdapter($namespace.'_1', 0, 'p1');
8585

src/Symfony/Component/Console/Command/Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Command
5555
*/
5656
public static function getDefaultName()
5757
{
58-
$class = \get_called_class();
58+
$class = static::class;
5959
$r = new \ReflectionProperty($class, 'defaultName');
6060

6161
return $class === $r->class ? static::$defaultName : null;
@@ -348,7 +348,7 @@ public function setDefinition($definition)
348348
public function getDefinition()
349349
{
350350
if (null === $this->definition) {
351-
throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', \get_class($this)));
351+
throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
352352
}
353353

354354
return $this->definition;

src/Symfony/Component/CssSelector/Node/AbstractNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ abstract class AbstractNode implements NodeInterface
3434
public function getNodeName()
3535
{
3636
if (null === $this->nodeName) {
37-
$this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', \get_called_class());
37+
$this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', static::class);
3838
}
3939

4040
return $this->nodeName;

src/Symfony/Component/DependencyInjection/Compiler/Compiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BE
8181
if (\func_num_args() >= 3) {
8282
$priority = func_get_arg(2);
8383
} else {
84-
if (__CLASS__ !== \get_class($this)) {
84+
if (__CLASS__ !== static::class) {
8585
$r = new \ReflectionMethod($this, __FUNCTION__);
8686
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
8787
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);

src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_O
123123
if (\func_num_args() >= 3) {
124124
$priority = func_get_arg(2);
125125
} else {
126-
if (__CLASS__ !== \get_class($this)) {
126+
if (__CLASS__ !== static::class) {
127127
$r = new \ReflectionMethod($this, __FUNCTION__);
128128
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
129129
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig:
474474
if (\func_num_args() >= 3) {
475475
$priority = func_get_arg(2);
476476
} else {
477-
if (__CLASS__ !== \get_class($this)) {
477+
if (__CLASS__ !== static::class) {
478478
$r = new \ReflectionMethod($this, __FUNCTION__);
479479
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
480480
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);

src/Symfony/Component/DependencyInjection/Extension/Extension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getNamespace()
6565
*/
6666
public function getAlias()
6767
{
68-
$className = \get_class($this);
68+
$className = static::class;
6969
if ('Extension' != substr($className, -9)) {
7070
throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.');
7171
}
@@ -79,7 +79,7 @@ public function getAlias()
7979
*/
8080
public function getConfiguration(array $config, ContainerBuilder $container)
8181
{
82-
$class = \get_class($this);
82+
$class = static::class;
8383

8484
if (false !== strpos($class, "\0")) {
8585
return null; // ignore anonymous classes

src/Symfony/Component/DependencyInjection/Loader/Configurator/AbstractConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __call($method, $args)
3131
return \call_user_func_array([$this, 'set'.$method], $args);
3232
}
3333

34-
throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', \get_class($this), $method));
34+
throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', static::class, $method));
3535
}
3636

3737
/**

src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(ContainerInterface $container)
4242
{
4343
$this->container = $container;
4444

45-
$class = \get_class($this);
45+
$class = static::class;
4646
if ($this instanceof \PHPUnit_Framework_MockObject_MockObject || $this instanceof MockObject || $this instanceof \Prophecy\Doubler\DoubleInterface) {
4747
$class = get_parent_class($class);
4848
}

src/Symfony/Component/ExpressionLanguage/Node/Node.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __toString()
4040
$attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true)));
4141
}
4242

43-
$repr = [str_replace('Symfony\Component\ExpressionLanguage\Node\\', '', \get_class($this)).'('.implode(', ', $attributes)];
43+
$repr = [str_replace('Symfony\Component\ExpressionLanguage\Node\\', '', static::class).'('.implode(', ', $attributes)];
4444

4545
if (\count($this->nodes)) {
4646
foreach ($this->nodes as $node) {
@@ -76,7 +76,7 @@ public function evaluate($functions, $values)
7676

7777
public function toArray()
7878
{
79-
throw new \BadMethodCallException(sprintf('Dumping a "%s" instance is not supported yet.', \get_class($this)));
79+
throw new \BadMethodCallException(sprintf('Dumping a "%s" instance is not supported yet.', static::class));
8080
}
8181

8282
public function dump()

src/Symfony/Component/Form/AbstractType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function configureOptions(OptionsResolver $resolver)
5252
*/
5353
public function getBlockPrefix()
5454
{
55-
return StringUtil::fqcnToBlockPrefix(\get_class($this)) ?: '';
55+
return StringUtil::fqcnToBlockPrefix(static::class) ?: '';
5656
}
5757

5858
/**

src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function configureOptions(OptionsResolver $resolver)
273273

274274
// Set by the user
275275
if (true !== $choicesAsValues) {
276-
throw new \RuntimeException(sprintf('The "choices_as_values" option of the %s should not be used. Remove it and flip the contents of the "choices" option instead.', \get_class($this)));
276+
throw new \RuntimeException(sprintf('The "choices_as_values" option of the %s should not be used. Remove it and flip the contents of the "choices" option instead.', static::class));
277277
}
278278

279279
@trigger_error('The "choices_as_values" option is deprecated since Symfony 3.1 and will be removed in 4.0. You should not use it anymore.', E_USER_DEPRECATED);

src/Symfony/Component/HttpFoundation/RedirectResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct($url, $status = 302, $headers = [])
4242
throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status));
4343
}
4444

45-
if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) {
45+
if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, CASE_LOWER))) {
4646
$this->headers->remove('cache-control');
4747
}
4848
}

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function destroy($sessionId)
133133
}
134134
if (!headers_sent() && filter_var(ini_get('session.use_cookies'), FILTER_VALIDATE_BOOLEAN)) {
135135
if (!$this->sessionName) {
136-
throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', \get_class($this)));
136+
throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class));
137137
}
138138
$sessionCookie = sprintf(' %s=', urlencode($this->sessionName));
139139
$sessionCookieWithId = sprintf('%s%s;', $sessionCookie, urlencode($sessionId));

src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function start()
137137
return true;
138138
}
139139

140-
if (\PHP_SESSION_ACTIVE === session_status()) {
140+
if (PHP_SESSION_ACTIVE === session_status()) {
141141
throw new \RuntimeException('Failed to start the session: already started by PHP.');
142142
}
143143

@@ -193,7 +193,7 @@ public function setName($name)
193193
public function regenerate($destroy = false, $lifetime = null)
194194
{
195195
// Cannot regenerate the session ID for non-active sessions.
196-
if (\PHP_SESSION_ACTIVE !== session_status()) {
196+
if (PHP_SESSION_ACTIVE !== session_status()) {
197197
return false;
198198
}
199199

@@ -341,7 +341,7 @@ public function isStarted()
341341
*/
342342
public function setOptions(array $options)
343343
{
344-
if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) {
344+
if (headers_sent() || PHP_SESSION_ACTIVE === session_status()) {
345345
return;
346346
}
347347

@@ -401,7 +401,7 @@ public function setSaveHandler($saveHandler = null)
401401
}
402402
$this->saveHandler = $saveHandler;
403403

404-
if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) {
404+
if (headers_sent() || PHP_SESSION_ACTIVE === session_status()) {
405405
return;
406406
}
407407

src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function isWrapper()
6565
*/
6666
public function isActive()
6767
{
68-
return \PHP_SESSION_ACTIVE === session_status();
68+
return PHP_SESSION_ACTIVE === session_status();
6969
}
7070

7171
/**

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function getBundle($name, $first = true/*, $noDeprecation = false */)
236236
}
237237

238238
if (!isset($this->bundleMap[$name])) {
239-
throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, \get_class($this)));
239+
throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your %s.php file?', $name, static::class));
240240
}
241241

242242
if (true === $first) {
@@ -583,7 +583,7 @@ protected function initializeContainer()
583583
$oldContainer = null;
584584
if ($fresh = $cache->isFresh()) {
585585
// Silence E_WARNING to ignore "include" failures - don't use "@" to prevent silencing fatal errors
586-
$errorLevel = error_reporting(\E_ALL ^ \E_WARNING);
586+
$errorLevel = error_reporting(E_ALL ^ E_WARNING);
587587
$fresh = $oldContainer = false;
588588
try {
589589
if (file_exists($cache->getPath()) && \is_object($this->container = include $cache->getPath())) {
@@ -651,7 +651,7 @@ protected function initializeContainer()
651651
}
652652

653653
if (null === $oldContainer && file_exists($cache->getPath())) {
654-
$errorLevel = error_reporting(\E_ALL ^ \E_WARNING);
654+
$errorLevel = error_reporting(E_ALL ^ E_WARNING);
655655
try {
656656
$oldContainer = include $cache->getPath();
657657
} catch (\Throwable $e) {

src/Symfony/Component/HttpKernel/Log/Logger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,6 @@ private function format($level, $message, array $context)
105105
$message = strtr($message, $replacements);
106106
}
107107

108-
return sprintf('%s [%s] %s', date(\DateTime::RFC3339), $level, $message).\PHP_EOL;
108+
return sprintf('%s [%s] %s', date(\DateTime::RFC3339), $level, $message).PHP_EOL;
109109
}
110110
}

src/Symfony/Component/HttpKernel/Tests/Controller/ContainerControllerResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testGetControllerService()
3939

4040
$controller = $resolver->getController($request);
4141

42-
$this->assertInstanceOf(\get_class($this), $controller[0]);
42+
$this->assertInstanceOf(static::class, $controller[0]);
4343
$this->assertSame('controllerMethod1', $controller[1]);
4444
}
4545

src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function provideControllerCallables()
9999
'"Regular" callable',
100100
[$this, 'testControllerInspection'],
101101
[
102-
'class' => RequestDataCollectorTest::class,
102+
'class' => self::class,
103103
'method' => 'testControllerInspection',
104104
'file' => __FILE__,
105105
'line' => $r1->getStartLine(),

src/Symfony/Component/HttpKernel/Tests/Log/LoggerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function testContextExceptionKeyCanBeExceptionOrOtherValues()
186186
public function testFormatter()
187187
{
188188
$this->logger = new Logger(LogLevel::DEBUG, $this->tmpFile, function ($level, $message, $context) {
189-
return json_encode(['level' => $level, 'message' => $message, 'context' => $context]).\PHP_EOL;
189+
return json_encode(['level' => $level, 'message' => $message, 'context' => $context]).PHP_EOL;
190190
});
191191

192192
$this->logger->error('An error', ['foo' => 'bar']);

src/Symfony/Component/Intl/Collator/Collator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ public static function create($locale)
109109
public function asort(&$array, $sortFlag = self::SORT_REGULAR)
110110
{
111111
$intlToPlainFlagMap = [
112-
self::SORT_REGULAR => \SORT_REGULAR,
113-
self::SORT_NUMERIC => \SORT_NUMERIC,
114-
self::SORT_STRING => \SORT_STRING,
112+
self::SORT_REGULAR => SORT_REGULAR,
113+
self::SORT_NUMERIC => SORT_NUMERIC,
114+
self::SORT_STRING => SORT_STRING,
115115
];
116116

117117
$plainSortFlag = isset($intlToPlainFlagMap[$sortFlag]) ? $intlToPlainFlagMap[$sortFlag] : self::SORT_REGULAR;

src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ class NumberFormatter
201201
* @see https://php.net/round
202202
*/
203203
private static $phpRoundingMap = [
204-
self::ROUND_HALFDOWN => \PHP_ROUND_HALF_DOWN,
205-
self::ROUND_HALFEVEN => \PHP_ROUND_HALF_EVEN,
206-
self::ROUND_HALFUP => \PHP_ROUND_HALF_UP,
204+
self::ROUND_HALFDOWN => PHP_ROUND_HALF_DOWN,
205+
self::ROUND_HALFEVEN => PHP_ROUND_HALF_EVEN,
206+
self::ROUND_HALFUP => PHP_ROUND_HALF_UP,
207207
];
208208

209209
/**
@@ -357,7 +357,7 @@ public function format($value, $type = self::TYPE_DEFAULT)
357357

358358
// The original NumberFormatter does not support this format type
359359
if (self::TYPE_CURRENCY === $type) {
360-
trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
360+
trigger_error(__METHOD__.'(): Unsupported format type '.$type, E_USER_WARNING);
361361

362362
return false;
363363
}
@@ -513,7 +513,7 @@ public function parse($value, $type = self::TYPE_DOUBLE, &$position = 0)
513513
$type = (int) $type;
514514

515515
if (self::TYPE_DEFAULT === $type || self::TYPE_CURRENCY === $type) {
516-
trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
516+
trigger_error(__METHOD__.'(): Unsupported format type '.$type, E_USER_WARNING);
517517

518518
return false;
519519
}

src/Symfony/Component/Lock/Store/CombinedStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function save(Key $key)
9393

9494
public function waitAndSave(Key $key)
9595
{
96-
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', \get_class($this)));
96+
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', static::class));
9797
}
9898

9999
/**

src/Symfony/Component/Lock/Store/MemcachedStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function save(Key $key)
7070

7171
public function waitAndSave(Key $key)
7272
{
73-
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', \get_class($this)));
73+
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', static::class));
7474
}
7575

7676
/**

src/Symfony/Component/Lock/Store/RedisStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function save(Key $key)
7373

7474
public function waitAndSave(Key $key)
7575
{
76-
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', \get_class($this)));
76+
throw new NotSupportedException(sprintf('The store "%s" does not support blocking locks.', static::class));
7777
}
7878

7979
/**

0 commit comments

Comments
 (0)
0