diff --git a/src/Console/Command/ShowCommand.php b/src/Console/Command/ShowCommand.php index b30f0426074..561b983febb 100644 --- a/src/Console/Command/ShowCommand.php +++ b/src/Console/Command/ShowCommand.php @@ -38,7 +38,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int private function reportLoadedRectors(): void { - $rectors = array_filter($this->rectors, function (RectorInterface $rector) { + $rectors = array_filter($this->rectors, function (RectorInterface $rector): bool { return ! $rector instanceof PostRectorInterface; }); diff --git a/src/DependencyInjection/CompilerPass/DeprecationWarningCompilerPass.php b/src/DependencyInjection/CompilerPass/DeprecationWarningCompilerPass.php index 40b7546ddfa..002fc878cdd 100644 --- a/src/DependencyInjection/CompilerPass/DeprecationWarningCompilerPass.php +++ b/src/DependencyInjection/CompilerPass/DeprecationWarningCompilerPass.php @@ -19,14 +19,15 @@ final class DeprecationWarningCompilerPass implements CompilerPassInterface public function process(ContainerBuilder $containerBuilder): void { - $parametersBag = $containerBuilder->getParameterBag(); + $parameterBag = $containerBuilder->getParameterBag(); foreach (self::DEPRECATED_PARAMETERS as $parameter => $message) { - if (! $parametersBag->has($parameter)) { + $parameterBagHas = $parameterBag->has($parameter); + if (! $parameterBagHas) { continue; } - $setsParameters = $parametersBag->get($parameter); + $setsParameters = $parameterBag->get($parameter); if ($setsParameters === []) { continue; } diff --git a/src/NodeManipulator/ClassMethodAssignManipulator.php b/src/NodeManipulator/ClassMethodAssignManipulator.php index c06661bbb6d..869b133014b 100644 --- a/src/NodeManipulator/ClassMethodAssignManipulator.php +++ b/src/NodeManipulator/ClassMethodAssignManipulator.php @@ -36,7 +36,7 @@ final class ClassMethodAssignManipulator /** * @var array */ - private $alreadyAddedClassMethodNames = []; + private array $alreadyAddedClassMethodNames = []; public function __construct( private BetterNodeFinder $betterNodeFinder,