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

Test Failed
Pull Request — fix-uploaders (#5518)
by Cristian
26:36 queued 12:28
created

UploaderCrudController::setupDeleteOperation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Backpack\CRUD\Tests\config\Http\Controllers;
4
5
use Backpack\CRUD\app\Http\Controllers\CrudController;
6
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD;
7
use Backpack\CRUD\Tests\config\Models\Uploader;
8
9
class UploaderCrudController extends CrudController
10
{
11
    use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation;
0 ignored issues
show
Bug introduced by
The trait Backpack\CRUD\app\Http\C...rations\CreateOperation requires the property $entity_name which is not provided by Backpack\CRUD\Tests\conf...\UploaderCrudController.
Loading history...
12
    use \Backpack\CRUD\app\Http\Controllers\Operations\UpdateOperation;
0 ignored issues
show
introduced by
The trait Backpack\CRUD\app\Http\C...rations\UpdateOperation requires some properties which are not provided by Backpack\CRUD\Tests\conf...\UploaderCrudController: $entity_name, $model
Loading history...
13
    use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
14
15
    public function setup()
16
    {
17
        CRUD::setModel(Uploader::class);
18
        CRUD::setRoute(config('backpack.base.route_prefix').'/uploader');
19
        CRUD::setEntityNameStrings('uploader', 'uploaders');
20
    }
21
22
    protected function setupCreateOperation()
23
    {
24
        //CRUD::setValidation(UploaderRequest::class);
25
26
        CRUD::field('upload')->type('upload')->withFiles(['disk' => 'uploaders', 'fileNamer' => fn ($value) => $value->getClientOriginalName()]);
0 ignored issues
show
Bug introduced by
The method withFiles() does not exist on Backpack\CRUD\app\Library\CrudPanel\CrudField. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

26
        CRUD::field('upload')->type('upload')->/** @scrutinizer ignore-call */ withFiles(['disk' => 'uploaders', 'fileNamer' => fn ($value) => $value->getClientOriginalName()]);
Loading history...
27
        CRUD::field('upload_multiple')->type('upload_multiple')->withFiles(['disk' => 'uploaders', 'fileNamer' => fn ($value) => $value->getClientOriginalName()]);
28
    }
29
30
    protected function setupUpdateOperation()
31
    {
32
        $this->setupCreateOperation();
33
    }
34
35
    public function setupDeleteOperation()
36
    {
37
        $this->setupCreateOperation();
38
    }
39
}
40