1 | <?php |
||
16 | class TestMessage implements ParameterInterface |
||
17 | { |
||
18 | /** |
||
19 | * Get parameter name |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | public static function getName(): string |
||
27 | |||
28 | /** |
||
29 | * Get parameter value |
||
30 | * |
||
31 | * @param TestTemplateOptions|TemplateOptionsInterface $options |
||
32 | * |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function getValue(TemplateOptionsInterface $options) |
||
39 | |||
40 | /** |
||
41 | * Get parameter description |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | public static function getDescription(): string |
||
49 | } |
||
50 |
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: