Passed
Pull Request — master (#721)
by Florian
09:26
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, $img, $name, $desc;
10
    public $cover;
11
12
    public function __construct($bg = 'info', $img, $name, $desc, $cover = null)
13
    {
14
        $this->bg = $bg;
15
        $this->img = $img;
16
        $this->name = $name;
17
        $this->desc = $desc;
18
        $this->cover = $cover;
19
    }
20
21
    public function background()
22
    {
23
        return 'bg-'.$this->bg;
24
    }
25
26
    public function render()
27
    {
28
        return view('adminlte::profile-widget');
29
    }
30
}