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 — bs4 ( c19352...5a3403 )
by
unknown
05:17 queued 53s
created

Text   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 13
c 3
b 0
f 0
dl 0
loc 50
rs 10
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setModifier() 0 5 1
A getModifier() 0 3 1
A toArray() 0 10 2
1
<?php
2
3
namespace SleepingOwl\Admin\Display\Column;
4
5
class Text extends NamedColumn
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $view = 'column.text';
11
12
    /**
13
     * @var \Closure|mixed
14
     */
15
    protected $modifier = null;
16
17
    /**
18
     * @var bool
19
     */
20
    protected $isSearchable = true;
21
22
    /**
23
     * @return \Closure|mixed
24
     */
25
    public function getModifier()
26
    {
27
        return $this->modifier;
28
    }
29
30
    /**
31
     * @param \Closure|mixed $modifier
32
     *
33
     * @return $this
34
     */
35
    public function setModifier($modifier)
36
    {
37
        $this->modifier = $modifier;
38
39
        return $this;
40
    }
41
42
    /**
43
     * @return array
44
     */
45
    public function toArray()
46
    {
47
        $model_value = $this->getModelValue();
48
        if (is_callable($modifier = $this->getModifier())) {
49
            $model_value = $modifier($model_value, $this->getModel());
50
        }
51
52
        return parent::toArray() + [
53
                'value' => $model_value,
54
                'small' => $this->getModelSmallValue(),
55
            ];
56
    }
57
}
58