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 — bassets-before-removing-assets ( c57739 )
by Cristian
37:02 queued 21:49
created

BaseTest::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
c 0
b 0
f 0
nc 1
nop 3
dl 0
loc 7
rs 10
1
<?php
2
3
namespace Backpack\CRUD\Tests;
4
5
use Backpack\CRUD\BackpackServiceProvider;
6
use Orchestra\Testbench\TestCase;
7
8
abstract class BaseTest extends TestCase
9
{
10
    /**
11
     * Setup the test environment.
12
     *
13
     * @return void
14
     */
15
    protected function setUp(): void
16
    {
17
        parent::setUp();
18
    }
19
20
    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

20
    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...
21
    {
22
        return [
23
            BackpackServiceProvider::class,
24
        ];
25
    }
26
27
    // allow us to run crud panel private/protected methods like `inferFieldTypeFromDbColumnType`
28
    public function invokeMethod(&$object, $methodName, array $parameters = [])
29
    {
30
        $reflection = new \ReflectionClass(get_class($object));
31
        $method = $reflection->getMethod($methodName);
32
        $method->setAccessible(true);
33
34
        return $method->invokeArgs($object, $parameters);
35
    }
36
}
37