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

ProfileFlat::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
1
<?php
2
3
namespace JeroenNoten\LaravelAdminLte\Components;
4
5
use Illuminate\View\Component;
6
7
class ProfileFlat extends Component
8
{
9
    public $bg;
10
    public $img;
11
    public $name;
12
    public $desc;
13
14 2
    public function __construct($bg = 'info', $img, $name, $desc)
15
    {
16 2
        $this->bg = $bg;
17 2
        $this->img = $img;
18 2
        $this->name = $name;
19 2
        $this->desc = $desc;
20 2
    }
21
22 1
    public function background()
23
    {
24 1
        return 'bg-'.$this->bg;
25
    }
26
27 1
    public function render()
28
    {
29 1
        return view('adminlte::components.profile-flat');
30
    }
31
}
32