Skip to content

Commit b506e94

Browse files
committed
Lint
1 parent dfe0544 commit b506e94

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/LaravelRequestDocs.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class LaravelRequestDocs
2020
* @param bool $showDelete
2121
* @param bool $showHead
2222
* @return \Rakutentech\LaravelRequestDocs\Doc[]
23+
* @throws \ReflectionException
2324
*/
2425
public function getDocs(
2526
bool $showGet,
@@ -229,11 +230,11 @@ public function appendRequestRules(array $controllersInfo): array
229230

230231
try {
231232
$controllerInfo->mergeRules($this->flattenRules($requestObject->$requestMethod()));
232-
} catch (Throwable $e) {
233+
} catch (Throwable) {
233234
$controllerInfo->mergeRules($this->rulesByRegex($requestClassName, $requestMethod));
234235
}
235236
}
236-
} catch (Throwable $th) {
237+
} catch (Throwable) {
237238
// Do nothing.
238239
}
239240

@@ -322,7 +323,7 @@ public function rulesByRegex(string $requestClassName, string $methodName): arra
322323
}
323324
}
324325

325-
$rules = collect($rules)
326+
return collect($rules)
326327
->filter(function ($item) {
327328
return count($item[0]) > 0;
328329
})
@@ -338,8 +339,6 @@ public function rulesByRegex(string $requestClassName, string $methodName): arra
338339
->transform(function ($item) {
339340
return $item['rules'];
340341
})->toArray();
341-
342-
return $rules;
343342
}
344343

345344
/**

0 commit comments

Comments
 (0)