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/Navigation/Badge.php (2 issues)

1
<?php
2
3
namespace SleepingOwl\Admin\Navigation;
4
5
class Badge extends \KodiComponents\Navigation\Badge
6
{
7
    public $view = null;
8
9
    /**
10
     * @return array
11
     */
12
    public function toArray()
13
    {
14
        $value = $this->getValue();
15
16
        if (! $this->hasClassProperty('label-', 'bg-')) {
17
            $this->setHtmlAttribute('class', 'label-primary');
18
        }
19
20
        return [
21
            'value' => $value,
22
            'attributes' => $this->htmlAttributesToString(),
23
        ];
24
    }
25
26
    /**
27
     * @return null|string
28
     */
29
    public function getView()
30
    {
31
        if ($this->view) {
32
            return $this->view;
33
        }
34
35
        return '_partials.navigation.badge';
36
    }
37
38
    /**
39
     * @param $view
40
     */
41
    public function setView($view)
42
    {
43
        $this->view = $view;
44
    }
45
46
    /**
47
     * @param null $view
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $view is correct as it would always require null to be passed?
Loading history...
48
     * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory
49
     */
50
    public function render($view = null)
51
    {
52
        return app('sleeping_owl.template')->view($this->getView(), $this->toArray());
0 ignored issues
show
The method view() does not exist on Illuminate\Contracts\Foundation\Application. ( Ignorable by Annotation )

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

52
        return app('sleeping_owl.template')->/** @scrutinizer ignore-call */ view($this->getView(), $this->toArray());

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
53
    }
54
}
55