diff --git a/src/Symfony/XmlParameterMapFactory.php b/src/Symfony/XmlParameterMapFactory.php index 4d3d3578..14516dac 100644 --- a/src/Symfony/XmlParameterMapFactory.php +++ b/src/Symfony/XmlParameterMapFactory.php @@ -70,7 +70,6 @@ private function getNodeValue(SimpleXMLElement $def) /** @var SimpleXMLElement $attrs */ $attrs = $def->attributes(); - $value = null; switch ((string) $attrs->type) { case 'collection': $value = []; diff --git a/src/Type/Symfony/ParameterDynamicReturnTypeExtension.php b/src/Type/Symfony/ParameterDynamicReturnTypeExtension.php index 687b0c33..618e0f6b 100644 --- a/src/Type/Symfony/ParameterDynamicReturnTypeExtension.php +++ b/src/Type/Symfony/ParameterDynamicReturnTypeExtension.php @@ -90,15 +90,14 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method { switch ($methodReflection->getName()) { case $this->methodGet: - return $this->getGetTypeFromMethodCall($methodReflection, $methodCall, $scope); + return $this->getGetTypeFromMethodCall($methodCall, $scope); case $this->methodHas: - return $this->getHasTypeFromMethodCall($methodReflection, $methodCall, $scope); + return $this->getHasTypeFromMethodCall($methodCall, $scope); } throw new ShouldNotHappenException(); } private function getGetTypeFromMethodCall( - MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope ): Type @@ -204,7 +203,6 @@ private function generalizeType(Type $type): Type } private function getHasTypeFromMethodCall( - MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope ): ?Type diff --git a/src/Type/Symfony/ServiceDynamicReturnTypeExtension.php b/src/Type/Symfony/ServiceDynamicReturnTypeExtension.php index 0667d30c..b9c23f91 100644 --- a/src/Type/Symfony/ServiceDynamicReturnTypeExtension.php +++ b/src/Type/Symfony/ServiceDynamicReturnTypeExtension.php @@ -62,15 +62,14 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method { switch ($methodReflection->getName()) { case 'get': - return $this->getGetTypeFromMethodCall($methodReflection, $methodCall, $scope); + return $this->getGetTypeFromMethodCall($methodCall, $scope); case 'has': - return $this->getHasTypeFromMethodCall($methodReflection, $methodCall, $scope); + return $this->getHasTypeFromMethodCall($methodCall, $scope); } throw new ShouldNotHappenException(); } private function getGetTypeFromMethodCall( - MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope ): ?Type @@ -120,7 +119,6 @@ private function tryCreateParameterBag(): ?ParameterBag } private function getHasTypeFromMethodCall( - MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope ): ?Type