GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 414922...a9bc98 )
by butschster
12:35
created

Badge   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 13 2
A render() 0 4 1
1
<?php
2
3
namespace SleepingOwl\Admin\Navigation;
4
5
class Badge extends \KodiComponents\Navigation\Badge
6
{
7
    /**
8
     * @return array
9
     */
10
    public function toArray()
11
    {
12
        $value = $this->getValue();
13
14
        if (! $this->hasClassProperty('label-', 'bg-')) {
15
            $this->setHtmlAttribute('class', 'label-primary');
16
        }
17
18
        return [
19
            'value' => $value,
20
            'attributes' => $this->htmlAttributesToString(),
21
        ];
22
    }
23
24
    /**
25
     * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory
26
     */
27
    public function render()
28
    {
29
        return app('sleeping_owl.template')->view('_partials.navigation.badge', $this->toArray());
30
    }
31
}
32