We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e8c1156 + 66a6cea commit 6b8ba82Copy full SHA for 6b8ba82
ControllerMetadata/ArgumentMetadataFactory.php
@@ -45,10 +45,10 @@ public function createArgumentMetadata($controller): array
45
*/
46
private function getType(\ReflectionParameter $parameter, \ReflectionFunctionAbstract $function): ?string
47
{
48
- if (!($type = $parameter->getType()) instanceof \ReflectionNamedType) {
+ if (!$type = $parameter->getType()) {
49
return null;
50
}
51
- $name = $type->getName();
+ $name = $type instanceof \ReflectionNamedType ? $type->getName() : (string) $type;
52
53
if ($function instanceof \ReflectionMethod) {
54
$lcName = strtolower($name);
0 commit comments