Passed
Pull Request — master (#721)
by Florian
03:35
created

SmallBox::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

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 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace JeroenNoten\LaravelAdminLte\Components;
4
5
use Illuminate\View\Component;
6
7
class SmallBox extends Component
8
{
9
    public $bg;
10
    public $icon;
11
    public $title;
12
    public $text;
13
    public $url;
14
    public $urlText;
15
    public $loading;
16
    public $id;
17
18 2
    public function __construct(
19
        $bg = 'info', $icon = 'fas fa-star', $title, $id = null,
20
        $text, $url = '#', $urlText = null,
21
        $loading = false)
22
    {
23 2
        $this->id = $id;
24 2
        $this->bg = $bg;
25 2
        $this->icon = $icon;
26 2
        $this->title = $title;
27 2
        $this->text = $text;
28 2
        $this->url = $url;
29 2
        $this->urlText = $urlText;
30 2
        $this->loading = $loading;
31 2
    }
32
33 1
    public function urlTextLine()
34
    {
35 1
        return ($this->urlText == null) ? 'More Info' : $this->urlText;
36
    }
37
38 1
    public function render()
39
    {
40 1
        return view('adminlte::components.small-box');
41
    }
42
}
43