Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some methods accepting `$request` and `$response` as arguments did not have the appropriate type hints, although the dockblock tags were suggesting these classes. This makes user mistakes hard to debug. For example: I did a mistake in my `Exceptions\Handler.php` of returning a `View` instead of a `Response` instance. ``` public function render(Request $request, Exception $e) { if ($e instanceof NotFoundHttpException) { return view('my.custom.404'); } } ``` The output was `exception 'BadMethodCallException' with message 'Method [isRedirection] does not exist on view.'`. `LaravelDebugbar` is calling `isRedirection()` on a `$response` argument, but there has no check if that argument was indeed a `Response` instance. By typehinting those arguments we can prevent this kind of errors and make the package less error-prone.
- Loading branch information