Skip to content

Commit

Permalink
fix isBuiltin function issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein4alaa committed Jul 3, 2024
1 parent bb82e3a commit dc94794
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit dc94794

Please sign in to comment.