Passed
Push — master ( d5d794...b1bf4d )
by Pascal
12:05
created

FormInputGroup::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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