Passed
Pull Request — master (#721)
by Florian
03:20
created

Progress   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
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 27
ccs 11
cts 11
cp 1
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A barsize() 0 3 2
A render() 0 3 1
1
<?php
2
3
namespace JeroenNoten\LaravelAdminLte\Components;
4
5
use Illuminate\View\Component;
6
7
class Progress extends Component
8
{
9
    public $size;
10
    public $bg;
11
    public $stripped;
12
    public $vertical;
13
    public $value;
14
15 2
    public function __construct(
16
        $size = null, $bg = 'info',
17
        $value, $stripped = false, $vertical = false)
18
    {
19 2
        $this->bg = $bg;
20 2
        $this->size = $size;
21 2
        $this->value = $value;
22 2
        $this->stripped = $stripped;
23 2
        $this->vertical = $vertical;
24 2
    }
25
26 1
    public function barsize()
27
    {
28 1
        return ! is_null($this->size) ? 'progress-'.$this->size : null;
29
    }
30
31 1
    public function render()
32
    {
33 1
        return view('adminlte::components.progress');
34
    }
35
}
36