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
Pull Request — main (#5715)
by Pedro
30:39 queued 15:11
created

FakeUploaderCrudController::setup()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 3
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
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\FakeUploader;
8
9
class FakeUploaderCrudController 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...eUploaderCrudController.
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...eUploaderCrudController: $entity_name, $model
Loading history...
13
    use \Backpack\CRUD\app\Http\Controllers\Operations\DeleteOperation;
14
15
    public function setup()
16
    {
17
        CRUD::setModel(FakeUploader::class);
18
        CRUD::setRoute(config('backpack.base.route_prefix').'/fake-uploader');
19
        CRUD::setEntityNameStrings('uploader', 'uploaders');
20
    }
21
22
    protected function setupCreateOperation()
23
    {
24
        CRUD::field('upload')
25
            ->type('upload')
26
            ->fake(true)
27
            ->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

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