Passed
Pull Request — master (#721)
by Florian
14:00 queued 04:02
created

Input   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 30
c 2
b 1
f 0
dl 0
loc 43
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A __construct() 0 21 1
1
<?php
2
3
namespace JeroenNoten\LaravelAdminLte\Components;
4
5
use Illuminate\View\Component;
6
7
class Input extends Component
8
{
9
    public $type;
10
    public $id;
11
    public $name;
12
    public $label;
13
    public $placeholder;
14
    public $topclass;
15
    public $inputclass;
16
    public $value;
17
    public $disabled;
18
    public $required;
19
    public $step;
20
    public $max;
21
    public $maxlength;
22
    public $pattern;
23
24
    public function __construct(
25
            $type = 'text', $id = null, $name = null,
26
            $label = 'Input Label', $placeholder = null,
27
            $topclass = null, $inputclass = null,
28
            $value = null, $disabled = false, $required = false,
29
            $step = null, $max = null, $maxlength = null, $pattern = null
30
        ) {
31
        $this->type = $type;
32
        $this->id = $id;
33
        $this->name = $name;
34
        $this->label = $label;
35
        $this->placeholder = $placeholder;
36
        $this->topclass = $topclass;
37
        $this->inputclass = $inputclass;
38
        $this->value = $value;
39
        $this->required = $required;
40
        $this->disabled = $disabled;
41
        $this->step = $step;
42
        $this->max = $max;
43
        $this->maxlength = $maxlength;
44
        $this->pattern = $pattern;
45
    }
46
47
    public function render()
48
    {
49
        return view('adminlte::input');
50
    }
51
}
52