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
Branch development (1ea943)
by butschster
05:38
created

TableHeaderColumn::render()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace SleepingOwl\Admin\Display;
4
5
use KodiComponents\Support\HtmlAttributes;
6
use SleepingOwl\Admin\Contracts\Display\TableHeaderColumnInterface;
7
use SleepingOwl\Admin\Traits\Renderable;
8
9
class TableHeaderColumn implements TableHeaderColumnInterface
10
{
11
    use HtmlAttributes, Renderable;
12
13
    /**
14
     * Header title.
15
     * @var string
16
     */
17
    protected $title;
18
19
    /**
20
     * Is column orderable?
21
     * @var bool
22
     */
23
    protected $orderable = false;
24
25
    /**
26
     * @var string|\Illuminate\View\View
27
     */
28
    protected $view = 'column.header';
29
30
    public function __construct()
31
    {
32
        $this->setHtmlAttribute('class', 'row-header');
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getTitle()
39
    {
40
        return $this->title;
41
    }
42
43
    /**
44
     * @param string $title
45
     *
46
     * @return $this
47
     */
48
    public function setTitle($title)
49
    {
50
        $this->title = $title;
51
52
        return $this;
53
    }
54
55
    /**
56
     * @return bool
57
     */
58
    public function isOrderable()
59
    {
60
        return $this->orderable;
61
    }
62
63
    /**
64
     * @param bool $orderable
65
     *
66
     * @return $this
67
     */
68
    public function setOrderable($orderable)
69
    {
70
        $this->orderable = (bool) $orderable;
71
72
        return $this;
73
    }
74
75
    /**
76
     * Get the instance as an array.
77
     *
78
     * @return array
79
     */
80
    public function toArray()
81
    {
82
        $this->setHtmlAttribute('data-orderable', $this->isOrderable() ? 'true' : 'false');
83
84
        return [
85
            'attributes'  => $this->htmlAttributesToString(),
86
            'title'       => $this->getTitle(),
87
            'isOrderable' => $this->isOrderable(),
88
        ];
89
    }
90
}
91