Passed
Pull Request — master (#721)
by Florian
02:44
created

ProfileWidget   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 13
c 2
b 1
f 0
dl 0
loc 25
ccs 11
cts 11
cp 1
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;
10
    public $img;
11
    public $name;
12
    public $desc;
13
    public $cover;
14
15 2
    public function __construct($bg = 'info', $img, $name, $desc, $cover = null)
16
    {
17 2
        $this->bg = $bg;
18 2
        $this->img = $img;
19 2
        $this->name = $name;
20 2
        $this->desc = $desc;
21 2
        $this->cover = $cover;
22 2
    }
23
24 1
    public function background()
25
    {
26 1
        return 'bg-'.$this->bg;
27
    }
28
29 1
    public function render()
30
    {
31 1
        return view('adminlte::components.profile-widget');
32
    }
33
}
34