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

FormModalComponent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 10 1
A __construct() 0 10 1
1
<?php
2
3
namespace Backpack\CRUD\app\Library\Form;
4
5
use Backpack\CRUD\app\Library\Form\FormComponent;
6
7
class FormModalComponent extends FormComponent
8
{
9
    /**
10
     * Create a new component instance.
11
     *
12
     * @param string $controller The CRUD controller class name
13
     * @param string $operation The operation to use (create, update, etc.)
14
     * @param string|null $action Custom form action URL
15
     * @param string $method Form method (post, put, etc.)
16
     * @param string $buttonText Text to display on the button that opens the modal
17
     * @param string $modalTitle Title for the modal
18
     * @param string $buttonClass CSS classes for the button
19
     */
20
    public function __construct(
21
        string $controller,
22
        string $operation = 'create',
23
        ?string $action = null,
24
        string $method = 'post',
25
        public string $buttonText = 'Open Form',
26
        public string $modalTitle = 'Form',
27
        public string $buttonClass = 'btn btn-primary'
28
    ) {
29
        parent::__construct($controller, $operation, $action, $method);
30
    }
31
32
    /**
33
     * Get the view / contents that represent the component.
34
     *
35
     * @return \Illuminate\Contracts\View\View|\Closure|string
36
     */
37
    public function render()
38
    {
39
        return view('crud::form.modal_form_component', [
40
            'crud' => $this->crud,
41
            'operation' => $this->operation,
42
            'formAction' => $this->formAction,
43
            'formMethod' => $this->formMethod,
44
            'buttonText' => $this->buttonText,
45
            'modalTitle' => $this->modalTitle,
46
            'buttonClass' => $this->buttonClass,
47
        ]);
48
    }
49
}