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 ( 5ad161 )
by Pedro
15:49 queued 01:42
created

FormModal::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 10
rs 10
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 $operation = 'create',
21
        public ?string $action = null,
22
        public string $method = 'post',
23
        public string $buttonText = 'Open Form',
24
        public string $modalTitle = 'Form',
25
        public string $buttonClass = 'btn btn-primary'
26
    ) {
27
        parent::__construct($controller, $operation, $action, $method);
28
    }
29
30
    /**
31
     * Get the view / contents that represent the component.
32
     *
33
     * @return \Illuminate\Contracts\View\View|\Closure|string
34
     */
35
    public function render()
36
    {
37
        return view('crud::components.form.modal_form', [
38
            'crud' => $this->crud,
39
            'operation' => $this->operation,
40
            'formAction' => $this->formAction,
41
            'formMethod' => $this->formMethod,
42
            'buttonText' => $this->buttonText,
43
            'modalTitle' => $this->modalTitle,
44
            'buttonClass' => $this->buttonClass,
45
        ]);
46
    }
47
}