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\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
|
|||||
28 | return new CrudPanel($app); |
||||
0 ignored issues
–
show
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
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. ![]() |
|||||
29 | }); |
||||
30 | $this->crudPanel = app('crud'); |
||||
31 | $this->crudPanel->setModel(TestModel::class); |
||||
32 | $this->model = $this->crudPanel->getModel(); |
||||
33 | } |
||||
34 | |||||
35 | /** |
||||
36 | * Define environment setup. |
||||
37 | * |
||||
38 | * @param \Illuminate\Foundation\Application $app |
||||
39 | * @return void |
||||
40 | */ |
||||
41 | protected function getEnvironmentSetUp($app) |
||||
42 | { |
||||
43 | $app['config']->set('database.default', 'testing'); |
||||
44 | $app['config']->set('backpack.base.route_prefix', 'admin'); |
||||
45 | |||||
46 | $app->bind('App\Http\Middleware\CheckIfAdmin', function () { |
||||
47 | return new class |
||||
48 | { |
||||
49 | public function handle($request, $next) |
||||
50 | { |
||||
51 | return $next($request); |
||||
52 | } |
||||
53 | }; |
||||
54 | }); |
||||
55 | } |
||||
56 | } |
||||
57 |
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.