1 | <?php |
||
18 | trait StateMiddlewareDependencyTrait |
||
19 | { |
||
20 | /** |
||
21 | * @var MiddlewareState |
||
22 | */ |
||
23 | private $state; |
||
24 | |||
25 | /** |
||
26 | * @todo |
||
27 | */ |
||
28 | final public function sendBeforeSignal() |
||
37 | |||
38 | /** |
||
39 | * @todo |
||
40 | */ |
||
41 | final public function sendAfterSignal() |
||
50 | |||
51 | /** |
||
52 | * @param MiddlewareState $middlewareState |
||
53 | */ |
||
54 | final public function attachMiddlewareState(MiddlewareState $middlewareState) |
||
58 | } |
||
59 | |||
61 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: