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

Passed
Push — match-route-file-end ( e4c060...07f3d2 )
by Pedro
11:32
created

anonymous//tests/config/CrudPanel/BaseCrudPanel.php$0   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
3
namespace Backpack\CRUD\Tests\Config\CrudPanel;
4
5
use Backpack\CRUD\app\Library\CrudPanel\CrudPanel;
6
use Backpack\CRUD\Tests\BaseTestClass;
7
use Backpack\CRUD\Tests\config\Models\TestModel;
8
9
abstract class BaseCrudPanel extends BaseTestClass
10
{
11
    /**
12
     * @var CrudPanel
13
     */
14
    protected $crudPanel;
15
16
    protected $model;
17
18
    /**
19
     * Setup the test environment.
20
     *
21
     * @return void
22
     */
23
    protected function setUp(): void
24
    {
25
        parent::setUp();
26
27
        $this->app->singleton('crud', function ($app) {
0 ignored issues
show
Bug introduced by
The method singleton() does not exist on null. ( Ignorable by Annotation )

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

27
        $this->app->/** @scrutinizer ignore-call */ 
28
                    singleton('crud', function ($app) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
28
            return new CrudPanel($app);
0 ignored issues
show
Unused Code introduced by
The call to Backpack\CRUD\app\Librar...rudPanel::__construct() has too many arguments starting with $app. ( Ignorable by Annotation )

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

28
            return /** @scrutinizer ignore-call */ new CrudPanel($app);

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
29
        });
30
        $this->crudPanel = app('crud');
31
        $this->crudPanel->setModel(TestModel::class);
32
        $this->model = $this->crudPanel->getModel();
33
    }
34
}
35