File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 2020 "league/fractal" : " ^0.19"
2121 },
2222 "require-dev" : {
23- "phpdocumentor/reflection-docblock" : " 3.3.2" ,
2423 "friendsofphp/php-cs-fixer" : " ~2" ,
2524 "illuminate/auth" : " ^7.0|^8.0" ,
2625 "illuminate/cache" : " ^7.0|^8.0" ,
Original file line number Diff line number Diff line change @@ -370,8 +370,15 @@ protected function handlerHint(callable $callback)
370370 $ reflection = new ReflectionFunction ($ callback );
371371
372372 $ exception = $ reflection ->getParameters ()[0 ];
373+ $ reflectionType = $ exception ->getType ();
373374
374- return $ exception ->getClass ()->getName ();
375+ if ($ reflectionType && ! $ reflectionType ->isBuiltin ()) {
376+ if ($ reflectionType instanceof \ReflectionNamedType) {
377+ return $ reflectionType ->getName ();
378+ }
379+ }
380+
381+ return '' ;
375382 }
376383
377384 /**
You can’t perform that action at this time.
0 commit comments