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

Visibled::getVisibled()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 2
eloc 3
nc 2
nop 0
dl 0
loc 7
rs 10
c 1
b 1
f 0
1
<?php
2
3
namespace SleepingOwl\Admin\Traits;
4
5
use Closure;
6
7
trait Visibled
8
{
9
    /**
10
     * @var bool|callable
11
     */
12
    protected $visibled = true;
13
14
    /**
15
     * @return bool|callable
16
     */
17
    public function getVisibled()
18
    {
19
        if (is_bool($this->visibled)) {
20
            return $this->visibled;
21
        }
22
23
        return (bool) $this->getValueFromObject($this->getModel(), $this->visibled);
0 ignored issues
show
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

23
        return (bool) $this->/** @scrutinizer ignore-call */ getValueFromObject($this->getModel(), $this->visibled);
Loading history...
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

23
        return (bool) $this->getValueFromObject($this->/** @scrutinizer ignore-call */ getModel(), $this->visibled);
Loading history...
24
    }
25
26
    /**
27
     * @param Closure|bool $visibled
28
     *
29
     * @return $this
30
     */
31
    public function setVisibled($visibled)
32
    {
33
        $this->visibled = $visibled;
34
35
        return $this;
36
    }
37
}
38