Passed
Pull Request — master (#721)
by Florian
02:40
created

InputDate::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace JeroenNoten\LaravelAdminLte\Components;
4
5
use Illuminate\View\Component;
6
7
class InputDate extends Component
8
{
9
    public $id;
10
    public $name;
11
    public $label;
12
    public $placeholder;
13
    public $topclass;
14
    public $inputclass;
15
    public $value;
16
    public $disabled;
17
    public $required;
18
    public $format;
19
20
    public function __construct(
21
            $id, $name = null,
22
            $label = 'Input Label', $placeholder = null,
23
            $topclass = null, $inputclass = null,
24
            $value = null, $disabled = false, $required = false,
25
            $format = 'YYYY-MM-DD'
26
        ) {
27
        $this->id = $id;
28
        $this->name = $name;
29
        $this->label = $label;
30
        $this->placeholder = $placeholder;
31
        $this->topclass = $topclass;
32
        $this->inputclass = $inputclass;
33
        $this->value = $value;
34
        $this->required = $required;
35
        $this->disabled = $disabled;
36
        $this->format = $format;
37
    }
38
39
    public function render()
40
    {
41
        return view('adminlte::components.input-date');
42
    }
43
}
44