1 | <?php |
||
13 | class View extends PhpView |
||
14 | { |
||
15 | public $title = 'Micro'; |
||
16 | public $menu = ['<a href="/">Главная</a>', '<a href="/blog/post">Блог</a>']; |
||
17 | public $user = []; |
||
18 | |||
19 | /** |
||
20 | * View constructor. |
||
21 | * @param IContainer $container |
||
22 | */ |
||
23 | public function __construct(IContainer $container) |
||
35 | } |
||
36 |
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: