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 Setup Failed
Pull Request — master (#2951)
by Cristian
22:13
created

FieldGroup::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Backpack\CRUD\app\Library\CrudPanel;
4
5
class FieldGroup
6
{
7
    protected $fields;
8
9
    public function __construct(...$fields)
10
    {
11
        $this->fields = $fields;
12
    }
13
14
    // -------------
15
    // MAGIC METHODS
16
    // -------------
17
18
    /**
19
     * We foward any call into FieldGroup class to the Field class once per defined field.
20
     *
21
     * @param  string $method     The method being called that doesn't exist.
22
     * @param  array $parameters  The arguments when that method was called.
23
     *
24
     * @return FieldGroup
25
     */
26
    public function __call($method, $parameter)
27
    {
28
        foreach ($this->fields as $field) {
29
            $field->{$method}($parameter[0]);
30
        }
31
32
        return $this;
33
    }
34
}
35