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 (#4854)
by Pedro
30:01 queued 14:59
created

SelectFromModel::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Backpack\CRUD\app\Library\Components\Fields;
4
5
use Backpack\CRUD\app\Library\Components\Attributes\Entity;
6
use Backpack\CRUD\app\Library\Components\Attributes\FieldType;
0 ignored issues
show
Bug introduced by
The type Backpack\CRUD\app\Librar...ts\Attributes\FieldType was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Backpack\CRUD\app\Library\Components\BaseField;
8
9
class SelectFromModel extends BaseField
10
{
11
    public function __construct(string|array $attributes)
12
    {
13
        parent::__construct($attributes);
14
        $this->attributes->setAttribute('type', 'select_from_model');
15
    }
16
17
    public static function blocked(): array
18
    {
19
        return [FieldType::class];
20
    }
21
22
    public function model(string $model): self
23
    {
24
        $this->attributes->setAttribute('model', $model);
25
26
        return $this;
27
    }
28
29
    public static function defaults(): array
30
    {
31
        return [
32
            Entity::class,
33
            'model'  => function ($attributes) {
34
                return app('crud')->inferModelFromRelationship($attributes->toArray());
0 ignored issues
show
Bug introduced by
The method inferModelFromRelationship() does not exist on Backpack\CRUD\app\Library\CrudPanel\CrudPanel. 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

34
                return app('crud')->/** @scrutinizer ignore-call */ inferModelFromRelationship($attributes->toArray());
Loading history...
35
            },
36
        ];
37
    }
38
}
39