Passed
Pull Request — 2.x (#1360)
by Harings
09:58
created

TwillFormComponent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
namespace A17\Twill\View\Components;
4
5
use Illuminate\View\Component;
6
7
abstract class TwillFormComponent extends Component
8
{
9
    public $name;
10
    /**
11
     * @var \A17\Twill\Models\Model
12
     */
13
    public $item;
14
    public $label;
15
    public $form_fields;
16
17
    public function __construct(
18
        $name,
19
        $label,
20
        $form
21
    ) {
22
        $this->item = $form['item'];
23
        $this->name = $name;
24
        $this->label = $label;
25
        $this->form_fields = $form['form_fields'];
26
    }
27
}
28