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 — next (#5688)
by Cristian
28:03 queued 12:49
created

Datatable::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 2 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 10
c 4
b 2
f 0
1
<?php
2
3
namespace Backpack\CRUD\app\Library\Datatable;
4
5
use Backpack\CRUD\app\Library\CrudPanel\CrudPanel;
6
use Illuminate\View\Component;
7
8
class Datatable extends Component
9
{
10
    public function __construct(
11
        private string $controller,
12
        private ?CrudPanel $crud = null,
13
        private bool $updatesUrl = true,
14
        private ?string $tableId = null,
15
        private ?\Closure $configure = null
16
    ) {
17
        $this->crud ??= \Backpack\CRUD\Backpack::crudFromController($controller);
0 ignored issues
show
Bug introduced by
The method crudFromController() does not exist on Backpack\CRUD\Backpack. Since you implemented __callStatic, 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

17
        $this->crud ??= \Backpack\CRUD\Backpack::/** @scrutinizer ignore-call */ crudFromController($controller);
Loading history...
18
        $this->tableId = 'crudTable_'.uniqid();
19
20
        // Apply the configuration if provided
21
        if ($this->configure) {
22
            ($this->configure)($this->crud);
23
        }
24
    }
25
26
    public function render()
27
    {
28
        return view('crud::datatable.datatable', [
29
            'crud' => $this->crud,
30
            'updatesUrl' => $this->updatesUrl,
31
            'tableId' => $this->tableId,
32
        ]);
33
    }
34
}
35