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 — analysis-m4VopE ( 4da4ca )
by butschster
12:05
created

SmallDisplay   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 2
Bugs 2 Features 0
Metric Value
eloc 13
dl 0
loc 57
rs 10
c 2
b 2
f 0
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setSmall() 0 6 1
A getSmall() 0 7 2
A getIsolated() 0 3 1
A setIsolated() 0 5 1
1
<?php
2
3
namespace SleepingOwl\Admin\Traits;
4
5
trait SmallDisplay
6
{
7
    /**
8
     * @var string
9
     * @var bool
10
     */
11
    protected $small;
12
    protected $smallString = false;
13
14
    /**
15
     * @var bool
16
     */
17
    protected $isolated = true;
18
19
    /**
20
     * @return string
21
     */
22
    public function getSmall()
23
    {
24
        if ($this->smallString) {
25
            return $this->small;
26
        }
27
28
        return $this->getValueFromObject($this->getModel(), $this->small);
0 ignored issues
show
Bug introduced by
It seems like getModel() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        return $this->getValueFromObject($this->/** @scrutinizer ignore-call */ getModel(), $this->small);
Loading history...
Bug introduced by
It seems like getValueFromObject() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        return $this->/** @scrutinizer ignore-call */ getValueFromObject($this->getModel(), $this->small);
Loading history...
29
    }
30
31
    /**
32
     * @param string $small
33
     *
34
     * @return $this
35
     */
36
    public function setSmall($small, $smallString = false)
37
    {
38
        $this->small = $small;
39
        $this->smallString = $smallString;
40
41
        return $this;
42
    }
43
44
    /**
45
     * @param bool $isolated
46
     *
47
     * @return $this
48
     */
49
    public function setIsolated($isolated)
50
    {
51
        $this->isolated = $isolated;
52
53
        return $this;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getIsolated()
60
    {
61
        return $this->isolated;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->isolated returns the type boolean which is incompatible with the documented return type string.
Loading history...
62
    }
63
}
64