Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
23 | public function __construct(IContainer $container) |
||
24 | { |
||
25 | parent::__construct($container); |
||
26 | |||
27 | if (!$this->container->user->isGuest()) { |
||
|
|||
28 | $this->user[] = '<a href="/profile">Профиль</a>'; |
||
29 | $this->user[] = ' (<a href="/logout">Выйти</a>)'; |
||
30 | } else { |
||
31 | $this->user[] = '<a href="/login">Войти</a>'; |
||
32 | $this->user[] = '<a href="/register">Регистрация</a>'; |
||
33 | } |
||
34 | } |
||
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: