Skip to content

Commit fd81195

Browse files
committed
Reflection: uses ReflectionNamedType
1 parent b75c82a commit fd81195

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils/Reflection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ public static function isBuiltinType(string $type): bool
3434
public static function getReturnType(\ReflectionFunctionAbstract $func): ?string
3535
{
3636
return $func->hasReturnType()
37-
? self::normalizeType((string) $func->getReturnType(), $func)
37+
? self::normalizeType($func->getReturnType()->getName(), $func)
3838
: null;
3939
}
4040

4141

4242
public static function getParameterType(\ReflectionParameter $param): ?string
4343
{
4444
return $param->hasType()
45-
? self::normalizeType((string) $param->getType(), $param)
45+
? self::normalizeType($param->getType()->getName(), $param)
4646
: null;
4747
}
4848

0 commit comments

Comments
 (0)