Passed
Pull Request — master (#721)
by Florian
05:31
created

ProfileWidgetItem::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 4
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace JeroenNoten\LaravelAdminLte\Components;
4
5
use Illuminate\View\Component;
6
7
class ProfileWidgetItem extends Component
8
{
9
    /**
10
     * The title/header for the item.
11
     *
12
     * @var string
13
     */
14
    public $title;
15
16
    /**
17
     * The text/description for the item.
18
     *
19
     * @var string
20
     */
21
    public $text;
22
23
    /**
24
     * A Font Awesome icon for the item.
25
     *
26
     * @var string
27
     */
28
    public $icon;
29
30
    /**
31
     * The item size. Used to wrap the item inside a col-sm-size div.
32
     *
33
     * @var string
34
     */
35
    public $size;
36
37
    /**
38
     * Create a new component instance.
39
     *
40
     * @return void
41
     */
42 1
    public function __construct(
43
        $title = null, $text = null, $icon = null, $size = 4
44
    ) {
45 1
        $this->title = $title;
46 1
        $this->text = $text;
47 1
        $this->icon = $icon;
48 1
        $this->size = $size;
49 1
    }
50
51
    /**
52
     * Get the view / contents that represent the component.
53
     *
54
     * @return \Illuminate\View\View|string
55
     */
56 1
    public function render()
57
    {
58 1
        return view('adminlte::components.profile-widget-item');
59
    }
60
}
61