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

TwillFormComponent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 9
rs 10
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