chore: static analysis adjustments - deprecation RE: ReflectionType::__toString

This commit is contained in:
jordanbrauer
2021-06-16 14:42:51 -05:00
parent e21e3080e0
commit 2e7192ab95

View File

@ -165,7 +165,9 @@ final class Reflection
$arguments = [];
foreach ($parameters as $parameter) {
$arguments[$parameter->getName()] = ($parameter->hasType()) ? (string) $parameter->getType() : 'mixed';
/** @var ReflectionNamedType|null $type */
$type = ($parameter->hasType()) ? $parameter->getType() : null;
$arguments[$parameter->getName()] = (is_null($type)) ? 'mixed' : $type->getName();
}
return $arguments;