DummyConstrainedHookPlugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 10
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRestriction() 0 3 1
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