diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php index 89857f78a8..b1c3546ac3 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php @@ -68,11 +68,10 @@ abstract class AbstractRecursivePass implements CompilerPassInterface * Processes a value found in a definition tree. * * @param mixed $value - * @param bool $isRoot * * @return mixed The processed value */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (\is_array($value)) { foreach ($value as $k => $v) { @@ -105,14 +104,11 @@ abstract class AbstractRecursivePass implements CompilerPassInterface } /** - * @param Definition $definition - * @param bool $required - * * @return \ReflectionFunctionAbstract|null * * @throws RuntimeException */ - protected function getConstructor(Definition $definition, $required) + protected function getConstructor(Definition $definition, bool $required) { if (\is_string($factory = $definition->getFactory())) { if (!\function_exists($factory)) { @@ -161,14 +157,11 @@ abstract class AbstractRecursivePass implements CompilerPassInterface } /** - * @param Definition $definition - * @param string $method - * * @throws RuntimeException * * @return \ReflectionFunctionAbstract */ - protected function getReflectionMethod(Definition $definition, $method) + protected function getReflectionMethod(Definition $definition, string $method) { if ('__construct' === $method) { return $this->getConstructor($definition, true); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php index d71b0138e4..83f568b706 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php @@ -74,7 +74,7 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass } } - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { $lazy = $this->lazy; $inExpression = $this->inExpression(); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php index 3ae264f5c8..6af322fbc3 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @@ -65,7 +65,7 @@ class AutowirePass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { try { return $this->doProcessValue($value, $isRoot); @@ -80,7 +80,7 @@ class AutowirePass extends AbstractRecursivePass } } - private function doProcessValue($value, $isRoot = false) + private function doProcessValue($value, bool $isRoot = false) { if ($value instanceof TypedReference) { if ($ref = $this->getAutowiredReference($value)) { @@ -373,7 +373,7 @@ class AutowirePass extends AbstractRecursivePass $this->ambiguousServiceTypes[$type][] = $id; } - private function createTypeNotFoundMessageCallback(TypedReference $reference, $label) + private function createTypeNotFoundMessageCallback(TypedReference $reference, string $label) { $container = new ContainerBuilder($this->container->getParameterBag()); $container->setAliases($this->container->getAliases()); @@ -386,7 +386,7 @@ class AutowirePass extends AbstractRecursivePass }; } - private function createTypeNotFoundMessage(ContainerBuilder $container, TypedReference $reference, $label, string $currentId) + private function createTypeNotFoundMessage(ContainerBuilder $container, TypedReference $reference, string $label, string $currentId) { if (!$r = $container->getReflectionClass($type = $reference->getType(), false)) { // either $type does not exist or a parent class does not exist @@ -444,7 +444,7 @@ class AutowirePass extends AbstractRecursivePass return sprintf(' You should maybe alias this %s to %s.', class_exists($type, false) ? 'class' : 'interface', $message); } - private function getAliasesSuggestionForType(ContainerBuilder $container, $type, $extraContext = null) + private function getAliasesSuggestionForType(ContainerBuilder $container, string $type, $extraContext = null) { $aliases = []; foreach (class_parents($type) + class_implements($type) as $parent) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php index 20d31135a7..c46d71f206 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php @@ -23,7 +23,7 @@ class AutowireRequiredMethodsPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { $value = parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php index e76e94005f..f016a507a1 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckArgumentsValidityPass.php @@ -32,7 +32,7 @@ class CheckArgumentsValidityPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof Definition) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php index eef71587cd..4ffe3540ce 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php @@ -43,7 +43,7 @@ class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass } } - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof Reference) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php b/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php index 8f2a3bdf70..0349ef7616 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/CheckReferenceValidityPass.php @@ -25,7 +25,7 @@ use Symfony\Component\DependencyInjection\Reference; */ class CheckReferenceValidityPass extends AbstractRecursivePass { - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if ($isRoot && $value instanceof Definition && ($value->isSynthetic() || $value->isAbstract())) { return $value; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php index 58c6e81a04..04ae8d51cb 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php @@ -53,12 +53,8 @@ class Compiler /** * Adds a pass to the PassConfig. - * - * @param CompilerPassInterface $pass A compiler pass - * @param string $type The type of the pass - * @param int $priority Used to sort the passes */ - public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) + public function addPass(CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) { $this->passConfig->addPass($pass, $type, $priority); } diff --git a/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php b/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php index 5ee0ff1f49..5e7ba3173e 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/DefinitionErrorExceptionPass.php @@ -26,7 +26,7 @@ class DefinitionErrorExceptionPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof Definition || !$value->hasErrors()) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php index 9a80286f4e..cb97ed1fb5 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPass.php @@ -101,7 +101,7 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if ($value instanceof ArgumentInterface) { // Reference found in ArgumentInterface::getValues() are not inlineable @@ -155,7 +155,7 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass * * @return bool If the definition is inlineable */ - private function isInlineableDefinition($id, Definition $definition) + private function isInlineableDefinition(string $id, Definition $definition) { if ($definition->hasErrors() || $definition->isDeprecated() || $definition->isLazy() || $definition->isSynthetic()) { return false; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php index e39cd4981a..fa6175d0a5 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php @@ -110,13 +110,9 @@ class PassConfig /** * Adds a pass. * - * @param CompilerPassInterface $pass A Compiler pass - * @param string $type The pass type - * @param int $priority Used to sort the passes - * * @throws InvalidArgumentException when a pass type doesn't exist */ - public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) + public function addPass(CompilerPassInterface $pass, string $type = self::TYPE_BEFORE_OPTIMIZATION, int $priority = 0) { $property = $type.'Passes'; if (!isset($this->$property)) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php index 852e7ca44a..d3a049399b 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterEnvVarProcessorsPass.php @@ -60,7 +60,7 @@ class RegisterEnvVarProcessorsPass implements CompilerPassInterface } } - private static function validateProvidedTypes($types, $class) + private static function validateProvidedTypes(string $types, string $class) { $types = explode('|', $types); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php index aeb9641811..ca49092d84 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php @@ -25,7 +25,7 @@ use Symfony\Contracts\Service\ServiceSubscriberInterface; */ class RegisterServiceSubscribersPass extends AbstractRecursivePass { - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof Definition || $value->isAbstract() || $value->isSynthetic() || !$value->hasTag('container.service_subscriber')) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php index d87ac4fea3..cf1a3ddc7a 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPass.php @@ -75,7 +75,7 @@ class RemoveUnusedDefinitionsPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof Reference) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php index 9981096361..ca781f2801 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php @@ -80,7 +80,7 @@ class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if ($value instanceof Reference && isset($this->replacements[$referenceId = (string) $value])) { // Perform the replacement diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php index 23fe4cabab..510910fe73 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php @@ -90,7 +90,7 @@ class ResolveBindingsPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if ($value instanceof TypedReference && $value->getType() === (string) $value) { // Already checked diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php index b641b357d5..941070e7f5 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php @@ -28,7 +28,7 @@ class ResolveChildDefinitionsPass extends AbstractRecursivePass { private $currentPath; - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof Definition) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveEnvPlaceholdersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveEnvPlaceholdersPass.php index 9e1edd4d31..ea52b14592 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveEnvPlaceholdersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveEnvPlaceholdersPass.php @@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\Definition; */ class ResolveEnvPlaceholdersPass extends AbstractRecursivePass { - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (\is_string($value)) { return $this->container->resolveEnvPlaceholders($value, true); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php index 848da7f2bd..23f535b71d 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveFactoryClassPass.php @@ -22,7 +22,7 @@ class ResolveFactoryClassPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if ($value instanceof Definition && \is_array($factory = $value->getFactory()) && null === $factory[0]) { if (null === $class = $value->getClass()) { diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php index 5def580589..1b9f4bfce6 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveHotPathPass.php @@ -47,7 +47,7 @@ class ResolveHotPathPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if ($value instanceof ArgumentInterface) { return $value; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php index 0b56476c69..f165c9e03f 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php @@ -44,7 +44,7 @@ class ResolveInstanceofConditionalsPass implements CompilerPassInterface } } - private function processDefinition(ContainerBuilder $container, $id, Definition $definition) + private function processDefinition(ContainerBuilder $container, string $id, Definition $definition) { $instanceofConditionals = $definition->getInstanceofConditionals(); $autoconfiguredInstanceof = $definition->isAutoconfigured() ? $container->getAutoconfiguredInstanceof() : []; diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php index ec4b6eec62..d7ebe69eb8 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php @@ -53,7 +53,7 @@ class ResolveInvalidReferencesPass implements CompilerPassInterface * * @throws RuntimeException When an invalid reference is found */ - private function processValue($value, $rootLevel = 0, $level = 0) + private function processValue($value, int $rootLevel = 0, int $level = 0) { if ($value instanceof ServiceClosureArgument) { $value->setValues($this->processValue($value->getValues(), 1, 1)); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php index 807fbe7489..1ceb004c17 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php @@ -26,7 +26,7 @@ class ResolveNamedArgumentsPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof Definition) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php index 2dec13f15d..91bba7ddb1 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveParameterPlaceHoldersPass.php @@ -58,7 +58,7 @@ class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass $this->bag = null; } - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (\is_string($value)) { $v = $this->bag->resolveValue($value); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php index bf9ea2b21a..f38dbc79a5 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPass.php @@ -42,7 +42,7 @@ class ResolveReferencesToAliasesPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof Reference) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php index 399f349046..518c03d7e7 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveServiceSubscribersPass.php @@ -25,7 +25,7 @@ class ResolveServiceSubscribersPass extends AbstractRecursivePass { private $serviceLocator; - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if ($value instanceof Reference && $this->serviceLocator && \in_array((string) $value, [ContainerInterface::class, ServiceProviderInterface::class], true)) { return new Reference($this->serviceLocator); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php index a4305722f7..48a034a847 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveTaggedIteratorArgumentPass.php @@ -25,7 +25,7 @@ class ResolveTaggedIteratorArgumentPass extends AbstractRecursivePass /** * {@inheritdoc} */ - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if (!$value instanceof TaggedIteratorArgument) { return parent::processValue($value, $isRoot); diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php index 424018b7ee..099ed9c342 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ServiceLocatorTagPass.php @@ -29,7 +29,7 @@ final class ServiceLocatorTagPass extends AbstractRecursivePass { use PriorityTaggedServiceTrait; - protected function processValue($value, $isRoot = false) + protected function processValue($value, bool $isRoot = false) { if ($value instanceof ServiceLocatorArgument) { if ($value->getTaggedIteratorArgument()) { @@ -87,11 +87,9 @@ final class ServiceLocatorTagPass extends AbstractRecursivePass } /** - * @param ContainerBuilder $container - * @param Reference[] $refMap - * @param string|null $callerId + * @param Reference[] $refMap */ - public static function register(ContainerBuilder $container, array $refMap, $callerId = null): Reference + public static function register(ContainerBuilder $container, array $refMap, string $callerId = null): Reference { foreach ($refMap as $id => $ref) { if (!$ref instanceof Reference) {