From 2e7192ab9565598c550ff53cd4a945db90639908 Mon Sep 17 00:00:00 2001 From: jordanbrauer <18744334+jordanbrauer@users.noreply.github.com> Date: Wed, 16 Jun 2021 14:42:51 -0500 Subject: [PATCH] chore: static analysis adjustments - deprecation RE: ReflectionType::__toString --- src/Support/Reflection.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Support/Reflection.php b/src/Support/Reflection.php index 1ad05804..7d46ece9 100644 --- a/src/Support/Reflection.php +++ b/src/Support/Reflection.php @@ -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;