Skip to content

Commit 6b8ba82

Browse files
Merge branch '3.4' into 4.4
* 3.4: Fix
2 parents e8c1156 + 66a6cea commit 6b8ba82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ControllerMetadata/ArgumentMetadataFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public function createArgumentMetadata($controller): array
4545
*/
4646
private function getType(\ReflectionParameter $parameter, \ReflectionFunctionAbstract $function): ?string
4747
{
48-
if (!($type = $parameter->getType()) instanceof \ReflectionNamedType) {
48+
if (!$type = $parameter->getType()) {
4949
return null;
5050
}
51-
$name = $type->getName();
51+
$name = $type instanceof \ReflectionNamedType ? $type->getName() : (string) $type;
5252

5353
if ($function instanceof \ReflectionMethod) {
5454
$lcName = strtolower($name);

0 commit comments

Comments
 (0)