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

ProfileWidget::background()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

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
rs 10
1
<?php
2
3
namespace JeroenNoten\LaravelAdminLte\Components;
4
5
use Illuminate\View\Component;
6
7
class ProfileWidget extends Component
8
{
9
    public $bg;
10
    public $img;
11
    public $name;
12
    public $desc;
13
    public $cover;
14
15
    public function __construct($bg = 'info', $img, $name, $desc, $cover = null)
16
    {
17
        $this->bg = $bg;
18
        $this->img = $img;
19
        $this->name = $name;
20
        $this->desc = $desc;
21
        $this->cover = $cover;
22
    }
23
24
    public function background()
25
    {
26
        return 'bg-'.$this->bg;
27
    }
28
29
    public function render()
30
    {
31
        return view('adminlte::profile-widget');
32
    }
33
}
34