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 — v6-livewire-widget ( bb8951...53543e )
by Pedro
14:58
created

BaseTestClass::invokeMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Backpack\CRUD\Tests;
4
5
use Backpack\Basset\BassetServiceProvider;
6
use Backpack\CRUD\BackpackServiceProvider;
7
use Illuminate\Support\Facades\Route;
8
use Orchestra\Testbench\TestCase;
9
10
abstract class BaseTestClass extends TestCase
11
{
12
    /**
13
     * Setup the test environment.
14
     *
15
     * @return void
16
     */
17
    protected function setUp(): void
18
    {
19
        parent::setUp();
20
21
        Route::group([
22
            (array) config('backpack.base.web_middleware', 'web'),
23
            (array) config('backpack.base.middleware_key', 'admin'),
24
            'prefix'     => config('backpack.base.route_prefix', 'admin'),
25
        ],
26
            function () {
27
                Route::crud('users', 'Backpack\CRUD\Tests\config\Http\Controllers\UserCrudController');
28
            }
29
        );
30
    }
31
32
    protected function getPackageProviders($app)
0 ignored issues
show
Unused Code introduced by
The parameter $app 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

32
    protected function getPackageProviders(/** @scrutinizer ignore-unused */ $app)

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...
33
    {
34
        return [
35
            BassetServiceProvider::class,
36
            BackpackServiceProvider::class,
37
        ];
38
    }
39
40
    // allow us to run crud panel private/protected methods like `inferFieldTypeFromDbColumnType`
41
    public function invokeMethod(&$object, $methodName, array $parameters = [])
42
    {
43
        $reflection = new \ReflectionClass(get_class($object));
44
        $method = $reflection->getMethod($methodName);
45
        $method->setAccessible(true);
46
47
        return $method->invokeArgs($object, $parameters);
48
    }
49
}
50