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

ProfileWidgetItem   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 10
dl 0
loc 52
ccs 8
cts 8
cp 1
rs 10
c 2
b 1
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A render() 0 3 1
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