We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
2 | |||
3 | namespace Backpack\CRUD\app\Exceptions; |
||
4 | |||
5 | use Exception; |
||
6 | |||
7 | class AccessDeniedException extends Exception |
||
8 | { |
||
9 | /** |
||
10 | * Render the exception into an HTTP response. |
||
11 | * |
||
12 | * @param \Illuminate\Http\Request |
||
13 | * @return \Illuminate\Http\Response |
||
14 | */ |
||
15 | public function render($request) |
||
0 ignored issues
–
show
|
|||
16 | { |
||
17 | return abort(403, $this->getMessage()); |
||
0 ignored issues
–
show
Are you sure the usage of
abort(403, $this->getMessage()) is correct as it seems to always return null .
This check looks for function or method calls that always return null and whose return value is used. class A
{
function getObject()
{
return null;
}
}
$a = new A();
if ($a->getObject()) {
The method The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
Loading history...
|
|||
18 | } |
||
19 | } |
||
20 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.