Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Issues (866)

Branch: main

app/Exceptions/BackpackProRequiredException.php (3 issues)

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
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

13
    public function render(/** @scrutinizer ignore-unused */ $request)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
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());
0 ignored issues
show
Are you sure the usage of abort(500, $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 getObject() can return nothing but null, so it makes no sense to use the return value.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
Bug Best Practice introduced by
The expression return abort(500, $this->getMessage()) returns the type void which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
24
    }
25
}
26