1 | <?php |
||
8 | class Tracy |
||
9 | { |
||
10 | /** |
||
11 | * $bar. |
||
12 | * |
||
13 | * @var \Tracy\Bar |
||
14 | */ |
||
15 | protected $bar; |
||
16 | |||
17 | /** |
||
18 | * __construct. |
||
19 | * |
||
20 | * @param array $config |
||
21 | * @param BarManager $barManager |
||
22 | * @param \Tracy\Bar $bar |
||
23 | */ |
||
24 | 1 | public function __construct($config = [], BarManager $barManager = null, Bar $bar = null) |
|
62 | |||
63 | /** |
||
64 | * __call. |
||
65 | * |
||
66 | * @param string $method |
||
67 | * @param array $parameters |
||
68 | * @return mix |
||
69 | */ |
||
70 | 1 | public function __call($method, $parameters) |
|
78 | |||
79 | /** |
||
80 | * instance. |
||
81 | * |
||
82 | * @param array$config |
||
83 | * @return static |
||
84 | */ |
||
85 | 1 | public static function instance($config = [], BarManager $barManager = null, Bar $bar = null) |
|
95 | } |
||
96 |
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: