Issues (47)

tests/unit/Plugin/DummyConstrainedHookPlugin.php (1 issue)

1
<?php
2
3
namespace CaptainHook\App\Plugin;
4
5
use CaptainHook\App\Hook\Constrained;
6
use CaptainHook\App\Hook\Restriction;
7
8
class DummyConstrainedHookPlugin extends DummyHookPlugin implements Constrained
9
{
10
    /**
11
     * @var Restriction|null
12
     */
13
    public static $restriction;
14
15
    public static function getRestriction(): Restriction
16
    {
17
        return self::$restriction;
0 ignored issues
show
Bug Best Practice introduced by
The expression return self::restriction could return the type null which is incompatible with the type-hinted return CaptainHook\App\Hook\Restriction. Consider adding an additional type-check to rule them out.
Loading history...
18
    }
19
}
20