1 | <?php |
||
12 | class PusherClientMessage implements PusherMessage |
||
13 | { |
||
14 | /** |
||
15 | * The payload to send. |
||
16 | * |
||
17 | * @var \stdClass |
||
18 | */ |
||
19 | protected $payload; |
||
20 | |||
21 | /** |
||
22 | * The socket connection. |
||
23 | * |
||
24 | * @var \Ratchet\ConnectionInterface |
||
25 | */ |
||
26 | protected $connection; |
||
27 | |||
28 | /** |
||
29 | * The channel manager. |
||
30 | * |
||
31 | * @var ChannelManager |
||
32 | */ |
||
33 | protected $channelManager; |
||
34 | |||
35 | /** |
||
36 | * Create a new instance. |
||
37 | * |
||
38 | * @param \stdClass $payload |
||
39 | * @param \Ratchet\ConnectionInterface $connection |
||
40 | * @param ChannelManager $channelManager |
||
41 | */ |
||
42 | public function __construct(stdClass $payload, ConnectionInterface $connection, ChannelManager $channelManager) |
||
48 | |||
49 | /** |
||
50 | * Respond to the message construction. |
||
51 | * |
||
52 | * @return void |
||
53 | */ |
||
54 | public function respond() |
||
79 | } |
||
80 |
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: