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.
Passed
Push — analysis-qJKbya ( 9a319d )
by butschster
08:06 queued 17s
created

Url::setText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace SleepingOwl\Admin\Display\Column;
4
5
class Url extends NamedColumn
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $view = 'column.url';
11
12
    /**
13
     * @var bool
14
     */
15
    protected $isSearchable = true;
16
17
    /**
18
     * @var string|bool
19
     */
20
    protected $icon = 'fas fa-external-link-square-alt';
21
22
    /**
23
     * @var string
24
     */
25
    protected $text = '';
26
27
    /**
28
     * @var bool
29
     */
30
    protected $orderable = true;
31
32
    /**
33
     * @var array
34
     */
35
    protected $linkAttributes = [];
36
37
    /**
38
     * @return array
39
     */
40
    public function getLinkAttributes()
41
    {
42
        return $this->linkAttributes;
43
    }
44
45
    /**
46
     * @param array $linkAttributes
47
     *
48
     * @return $this
49
     */
50
    public function setLinkAttributes(array $linkAttributes)
51
    {
52
        $this->linkAttributes = $linkAttributes;
53
54
        return $this;
55
    }
56
57
    /**
58
     * @return string|bool
59
     */
60
    public function getText()
61
    {
62
        if ($this->getValueFromObject($this->getModel(), $this->text)) {
63
            return $this->getValueFromObject($this->getModel(), $this->text);
64
        }
65
66
        return $this->text;
67
    }
68
69
    /**
70
     * @param string|bool $icon
71
     *
72
     * @return $this
73
     */
74
    public function setText($text)
75
    {
76
        $this->text = $text;
77
78
        return $this;
79
    }
80
81
    /**
82
     * @return string|bool
83
     */
84
    public function getIcon()
85
    {
86
        return $this->icon;
87
    }
88
89
    /**
90
     * @param string|bool $icon
91
     *
92
     * @return $this
93
     */
94
    public function setIcon($icon)
95
    {
96
        $this->icon = $icon;
97
98
        return $this;
99
    }
100
101
    /**
102
     * @return array
103
     */
104
    public function toArray()
105
    {
106
        return parent::toArray() + [
107
            'linkAttributes' => $this->getLinkAttributes(),
108
            'value' => htmlspecialchars($this->getModelValue()),
109
            'icon' => $this->getIcon(),
110
            'text' => $this->getText(),
111
        ];
112
    }
113
}
114