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 (#2951)
by Pedro
35:23 queued 20:21
created

CrudObjectGroup::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 3
c 1
b 0
f 1
nc 2
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
namespace Backpack\CRUD\app\Library\CrudPanel;
4
5
class CrudObjectGroup
6
{
7
    protected $objects;
8
9
    /**
10
     * Add CrudObjects (fields, columns etc) to the group.
11
     */
12
    public function __construct(...$objects)
13
    {
14
        if (is_array($objects[0])) {
15
            $objects = $objects[0];
16
        }
17
18
        $this->objects = $objects;
19
    }
20
21
    // -------------
22
    // MAGIC METHODS
23
    // -------------
24
25
    /**
26
     * We forward any call to the corresponding class passed by developer (Field, Columns, Filters etc ..).
27
     */
28
    public function __call(string $method, array $parameter)
29
    {
30
        foreach ($this->objects as $object) {
31
            $object->{$method}($parameter[0]);
32
        }
33
34
        return $this;
35
    }
36
}
37