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   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A __call() 0 7 2
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