Skip to content

Commit 7b3f47e

Browse files
committed
Fix CS
1 parent 3440397 commit 7b3f47e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

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);

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);

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);

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

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
/**

0 commit comments

Comments
 (0)