Skip to content

Commit b11d762

Browse files
try reflect
1 parent db514e5 commit b11d762

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/LaravelRequestDocs.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ public function appendRequestRules(array $controllersInfo)
118118
foreach ($controllersInfo as $index => $controllerInfo) {
119119
$controller = $controllerInfo['controller_full_path'];
120120
$method = $controllerInfo['method'];
121-
$reflectionMethod = new ReflectionMethod($controller, $method);
121+
try {
122+
$reflectionMethod = new ReflectionMethod($controller, $method);
123+
} catch (Throwable $e) {
124+
continue;
125+
}
122126
$params = $reflectionMethod->getParameters();
123127
$customRules = $this->customParamsDocComment($reflectionMethod->getDocComment());
124128
$controllersInfo[$index]['rules'] = [];

0 commit comments

Comments
 (0)