From dc947943fd9a165420f7e25f60dc56c36a247839 Mon Sep 17 00:00:00 2001 From: Hussein Alaa Date: Wed, 3 Jul 2024 13:40:14 +0300 Subject: [PATCH] fix isBuiltin function issue --- src/Helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Helpers.php b/src/Helpers.php index 55ca74f..ec5b396 100644 --- a/src/Helpers.php +++ b/src/Helpers.php @@ -67,7 +67,7 @@ public function getRequestClassName(string $controllerMethod): array $parameters = $reflection->getParameters() ?? []; foreach ($parameters as $parameter) { $typeHint = $parameter ? $parameter->getType() : null; - if ($typeHint && !$typeHint->isBuiltin()) { + if ($typeHint instanceof ReflectionNamedType && !$typeHint->isBuiltin()) { try { $request = $typeHint->getName(); $request = new $request();