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.

Issues (389)

Branch: master

src/Traits/VisibleCondition.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace SleepingOwl\Admin\Traits;
4
5
use Closure;
6
7
trait VisibleCondition
8
{
9
    /**
10
     * @var Closure|null
11
     */
12
    protected $visibleCondition;
13
14
    /**
15
     * @return bool
16
     */
17 1
    public function isVisible()
18
    {
19 1
        if (is_callable($this->visibleCondition)) {
20 1
            return (bool) call_user_func($this->visibleCondition, $this->getModel());
0 ignored issues
show
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

20
            return (bool) call_user_func($this->visibleCondition, $this->/** @scrutinizer ignore-call */ getModel());
Loading history...
21
        }
22
23
        return true;
24
    }
25
26
    /**
27
     * @param Closure $condition
28
     *
29
     * @return $this
30
     */
31 1
    public function setVisibilityCondition(Closure $condition)
32
    {
33 1
        $this->visibleCondition = $condition;
34
35 1
        return $this;
36
    }
37
}
38