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/Widgets/Widget.php (1 issue)

1
<?php
2
3
namespace SleepingOwl\Admin\Widgets;
4
5
use Illuminate\Contracts\View\View;
6
use SleepingOwl\Admin\Contracts\Widgets\WidgetInterface;
7
8
abstract class Widget implements WidgetInterface
9
{
10
    /**
11
     * @var \Illuminate\View\View
12
     */
13
    protected $view;
14
15
    /**
16
     * @return bool
17
     */
18 285
    public function active()
19
    {
20 285
        return true;
21
    }
22
23
    /**
24
     * @return int
25
     */
26
    public function position()
27
    {
28
        return 0;
29
    }
30
31
    /**
32
     * @param View $view
33
     */
34
    public function setInjectableView(View $view)
35
    {
36
        $this->view = $view;
0 ignored issues
show
Documentation Bug introduced by
$view is of type Illuminate\Contracts\View\View, but the property $view was declared to be of type Illuminate\View\View. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.

Either this assignment is in error or an instanceof check should be added for that assignment.

class Alien {}

class Dalek extends Alien {}

class Plot
{
    /** @var  Dalek */
    public $villain;
}

$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
    $plot->villain = $alien;
}
Loading history...
37
    }
38
39
    /**
40
     * @return array
41
     */
42
    public function toArray()
43
    {
44
        return [
45
            'block' => $this->block(),
46
            'template' => $this->template(),
47
            'html' => $this->toHtml(),
48
            'position' => $this->position(),
49
        ];
50
    }
51
}
52