1 | <?php |
||
7 | class ConnectionLogger extends Logger implements ConnectionInterface |
||
8 | { |
||
9 | /** @var \Ratchet\ConnectionInterface */ |
||
10 | protected $connection; |
||
11 | |||
12 | public static function decorate(ConnectionInterface $app): self |
||
18 | |||
19 | public function setConnection(ConnectionInterface $connection) |
||
25 | |||
26 | protected function getConnection() |
||
30 | |||
31 | public function send($data) |
||
39 | |||
40 | public function close() |
||
46 | |||
47 | public function __set($name, $value) |
||
51 | |||
52 | public function __get($name) |
||
56 | |||
57 | public function __isset($name) |
||
61 | |||
62 | public function __unset($name) |
||
66 | } |
||
67 |
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: