Passed
Pull Request — master (#721)
by Florian
09:26
created

ProfileWidget   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 3

3 Methods

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