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 — form-component ( bfbf10 )
by Pedro
13:31
created

FormComponent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 7 1
A __construct() 0 11 1
1
<?php
2
3
namespace Backpack\CRUD\app\Library\Form;
4
5
use Backpack\CRUD\CrudManager;
6
use Illuminate\View\Component;
7
8
class FormComponent extends Component
9
{
10
    public $crud;
11
    public $operation;
12
    public $formAction;
13
    public $formMethod;
14
15
    /**
16
     * Create a new component instance.
17
     *
18
     * @param string $controller The CRUD controller class name
19
     * @param string $operation The operation to use (create, update, etc.)
20
     * @param string|null $action Custom form action URL
21
     * @param string $method Form method (post, put, etc.)
22
     */
23
    public function __construct(
24
        public string $controller,
25
        string $operation = 'create',
26
        ?string $action = null,
27
        string $method = 'post'
28
    ) {
29
        // Get CRUD panel instance from the controller
30
        $this->crud = CrudManager::crudFromController($controller, $operation);
0 ignored issues
show
Bug introduced by
The method crudFromController() does not exist on Backpack\CRUD\CrudManager. 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

30
        /** @scrutinizer ignore-call */ 
31
        $this->crud = CrudManager::crudFromController($controller, $operation);
Loading history...
31
        $this->operation = $operation;
32
        $this->formAction = $action ?? url($this->crud->route);
33
        $this->formMethod = $method;
34
    }
35
36
    /**
37
     * Get the view / contents that represent the component.
38
     *
39
     * @return \Illuminate\Contracts\View\View|\Closure|string
40
     */
41
    public function render()
42
    {
43
        return view('crud::form.form_component', [
44
            'crud' => $this->crud,
45
            'operation' => $this->operation,
46
            'formAction' => $this->formAction,
47
            'formMethod' => $this->formMethod,
48
        ]);
49
    }
50
}