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
Push — pass-column-subfields-through-... ( 7988ae )
by Pedro
13:16 queued 44s
created

HasSubfields   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A subfields() 0 10 2
1
<?php
2
3
namespace Backpack\CRUD\app\Library\CrudPanel\Support;
4
5
trait HasSubfields
6
{
7
    /**
8
     * When subfields are defined, pass them through the guessing function
9
     * so that they have label, relationship attributes, etc.
10
     *
11
     * @param  array  $subfields  Subfield definition array
12
     * @return self
13
     */
14
    public function subfields($subfields)
15
    {
16
        $callAttributeMacro = ! isset($this->attributes['subfields']);
17
        $this->attributes['subfields'] = $subfields;
0 ignored issues
show
Bug Best Practice introduced by
The property attributes does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
18
        $this->attributes = $this->crud()->makeSureFieldHasNecessaryAttributes($this->attributes);
0 ignored issues
show
Bug introduced by
It seems like crud() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

18
        $this->attributes = $this->/** @scrutinizer ignore-call */ crud()->makeSureFieldHasNecessaryAttributes($this->attributes);
Loading history...
19
        if ($callAttributeMacro) {
20
            $this->callRegisteredAttributeMacros();
0 ignored issues
show
Bug introduced by
It seems like callRegisteredAttributeMacros() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

20
            $this->/** @scrutinizer ignore-call */ 
21
                   callRegisteredAttributeMacros();
Loading history...
21
        }
22
23
        return $this->save();
0 ignored issues
show
Bug introduced by
It seems like save() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

23
        return $this->/** @scrutinizer ignore-call */ save();
Loading history...
24
    }
25
}
26