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 — development-bs4 ( bc8456...b9684a )
by butschster
29:24 queued 19:50
created

Url   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 109
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 25
dl 0
loc 109
rs 10
c 0
b 0
f 0
wmc 8

7 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 7 1
A getLinkAttributes() 0 3 1
A getIcon() 0 3 1
A setIcon() 0 5 1
A setText() 0 6 1
A getText() 0 7 2
A setLinkAttributes() 0 5 1
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
     * @var bool
25
     */
26
    protected $text = '';
27
    protected $textString = false;
28
29
    /**
30
     * @var bool
31
     */
32
    protected $orderable = true;
33
34
    /**
35
     * @var array
36
     */
37
    protected $linkAttributes = [];
38
39
    /**
40
     * @return array
41
     */
42
    public function getLinkAttributes()
43
    {
44
        return $this->linkAttributes;
45
    }
46
47
    /**
48
     * @param array $linkAttributes
49
     *
50
     * @return $this
51
     */
52
    public function setLinkAttributes(array $linkAttributes)
53
    {
54
        $this->linkAttributes = $linkAttributes;
55
56
        return $this;
57
    }
58
59
    /**
60
     * @return string|bool
61
     */
62
    public function getText()
63
    {
64
        if ($this->textString) {
65
            return $this->text;
66
        }
67
68
        return $this->getValueFromObject($this->getModel(), $this->text);
69
    }
70
71
    /**
72
     * @param string|bool $icon
73
     *
74
     * @return $this
75
     */
76
    public function setText($text, $textString = false)
77
    {
78
        $this->text = $text;
79
        $this->textString = $textString;
80
81
        return $this;
82
    }
83
84
    /**
85
     * @return string|bool
86
     */
87
    public function getIcon()
88
    {
89
        return $this->icon;
90
    }
91
92
    /**
93
     * @param string|bool $icon
94
     *
95
     * @return $this
96
     */
97
    public function setIcon($icon)
98
    {
99
        $this->icon = $icon;
100
101
        return $this;
102
    }
103
104
    /**
105
     * @return array
106
     */
107
    public function toArray()
108
    {
109
        return parent::toArray() + [
110
            'linkAttributes' => $this->getLinkAttributes(),
111
            'value' => htmlspecialchars($this->getModelValue()),
112
            'icon' => $this->getIcon(),
113
            'text' => $this->getText(),
114
        ];
115
    }
116
}
117