From 64be97086628ab044ed599b6fb49b1dcf98882ee Mon Sep 17 00:00:00 2001 From: Fernando Santos Souza Date: Thu, 21 Mar 2024 16:04:10 +0000 Subject: [PATCH] hotfix - Adding check to confirm if the object is of type ReflectionNamedType. --- src/Builders/Paths/Operation/ParametersBuilder.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Builders/Paths/Operation/ParametersBuilder.php b/src/Builders/Paths/Operation/ParametersBuilder.php index 2333690..9d376fc 100644 --- a/src/Builders/Paths/Operation/ParametersBuilder.php +++ b/src/Builders/Paths/Operation/ParametersBuilder.php @@ -39,7 +39,9 @@ protected function buildPath(RouteInformation $route): Collection return null; } - $schema = SchemaHelpers::guessFromReflectionType($reflectionParameter->getType()); + if ($reflectionParameter->getType() instanceof \ReflectionNamedType) { + $schema = SchemaHelpers::guessFromReflectionType($reflectionParameter->getType()); + } } /** @var Param $description */