Laravel-Backpack /
CRUD
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 | class BackpackProRequiredException extends \Exception |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Render the exception into an HTTP response. |
||
| 9 | * |
||
| 10 | * @param \Illuminate\Http\Request |
||
| 11 | * @return \Illuminate\Http\Response |
||
| 12 | */ |
||
| 13 | public function render($request) |
||
|
0 ignored issues
–
show
|
|||
| 14 | { |
||
| 15 | // 0, by default, pass only what is a feature we construct the rest of the message |
||
| 16 | // 1 use the provided message in full |
||
| 17 | switch ($this->getCode()) { |
||
| 18 | case 0: |
||
| 19 | $this->message = $this->message.' is a Backpack PRO feature. Please purchase and install the Backpack\PRO addon from backpackforlaravel.com'; |
||
| 20 | break; |
||
| 21 | } |
||
| 22 | |||
| 23 | return abort(500, $this->getMessage(), ['developer-error-exception']); |
||
|
0 ignored issues
–
show
Are you sure the usage of
abort(500, $this->getMes...oper-error-exception')) 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...
|
|||
| 24 | } |
||
| 25 | } |
||
| 26 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.