Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Symfony/XmlParameterMapFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ private function getNodeValue(SimpleXMLElement $def)
/** @var SimpleXMLElement $attrs */
$attrs = $def->attributes();

$value = null;
switch ((string) $attrs->type) {
case 'collection':
$value = [];
Expand Down
6 changes: 2 additions & 4 deletions src/Type/Symfony/ParameterDynamicReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -204,7 +203,6 @@ private function generalizeType(Type $type): Type
}

private function getHasTypeFromMethodCall(
MethodReflection $methodReflection,
MethodCall $methodCall,
Scope $scope
): ?Type
Expand Down
6 changes: 2 additions & 4 deletions src/Type/Symfony/ServiceDynamicReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -120,7 +119,6 @@ private function tryCreateParameterBag(): ?ParameterBag
}

private function getHasTypeFromMethodCall(
MethodReflection $methodReflection,
MethodCall $methodCall,
Scope $scope
): ?Type
Expand Down
Loading