DummyConstrainedHookPlugin::getRestriction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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