Completed
Push — master ( a7b5fe...4405b1 )
by wen
03:16
created

Badge   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 8 2
1
<?php
2
3
namespace Sco\Admin\Navigation;
4
5
class Badge extends \KodiComponents\Navigation\Badge
6
{
7
    public function toArray()
8
    {
9
        if (!$this->hasClassProperty('label-', 'bg-')) {
10
            $this->setHtmlAttribute('class', 'label-primary');
11
        }
12
13
        return ['value' => $this->getValue()] + $this->getHtmlAttributes();
14
    }
15
}
16