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 — add-form-component ( b93bc1...ad0dd3 )
by Pedro
12:38
created

FormModal   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

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

2 Methods

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