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   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A model() 0 5 1
A __construct() 0 4 1
A defaults() 0 6 1
A blocked() 0 3 1
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