FormGroup::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 2
nc 2
nop 4
1
<?php
2
3
namespace ProtoneMedia\LaravelFormComponents\Components;
4
5
class FormGroup extends Component
6
{
7
    use HandlesValidationErrors;
8
9
    public string $name;
10
    public string $label;
11
    public bool $inline = false;
12
13
    /**
14
     * Create a new component instance.
15
     *
16
     * @return void
17
     */
18
    public function __construct(string $name = '', string $label = '', bool $inline = false, bool $showErrors = true)
19
    {
20
        $this->name       = $name;
21
        $this->label      = $label;
22
        $this->inline     = $inline;
23
        $this->showErrors = $name && $showErrors;
24
    }
25
}
26