diff --git a/rules/Symfony42/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php b/rules/Symfony42/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php index 39173294..1d2c5ebb 100644 --- a/rules/Symfony42/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php +++ b/rules/Symfony42/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php @@ -149,7 +149,7 @@ private function decorateCommandConstructor(Class_ $class): void } // empty stmts? add parent::__construct() to setup command - if (count((array) $constuctClassMethod->stmts) === 0) { + if ((array) $constuctClassMethod->stmts === []) { $parentConstructStaticCall = new StaticCall(new Name('parent'), '__construct'); $constuctClassMethod->stmts[] = new Expression($parentConstructStaticCall); }