1 | <?php |
||
9 | class HttpLogger extends Logger implements MessageComponentInterface |
||
10 | { |
||
11 | /** |
||
12 | * The HTTP app instance to watch. |
||
13 | * |
||
14 | * @var \Ratchet\Http\HttpServerInterface |
||
15 | */ |
||
16 | protected $app; |
||
17 | |||
18 | /** |
||
19 | * Create a new instance and add the app to watch. |
||
20 | * |
||
21 | * @param \Ratchet\MessageComponentInterface $app |
||
22 | * @return self |
||
23 | */ |
||
24 | public static function decorate(MessageComponentInterface $app): self |
||
30 | |||
31 | /** |
||
32 | * Set a new app to watch. |
||
33 | * |
||
34 | * @param \Ratchet\MessageComponentInterface $app |
||
35 | * @return $this |
||
36 | */ |
||
37 | public function setApp(MessageComponentInterface $app) |
||
43 | |||
44 | /** |
||
45 | * Handle the HTTP open request. |
||
46 | * |
||
47 | * @param \Ratchet\ConnectionInterface $connection |
||
48 | * @return void |
||
49 | */ |
||
50 | public function onOpen(ConnectionInterface $connection) |
||
54 | |||
55 | /** |
||
56 | * Handle the HTTP message request. |
||
57 | * |
||
58 | * @param \Ratchet\ConnectionInterface $connection |
||
59 | * @param mixed $message |
||
60 | * @return void |
||
61 | */ |
||
62 | public function onMessage(ConnectionInterface $connection, $message) |
||
66 | |||
67 | /** |
||
68 | * Handle the HTTP close request. |
||
69 | * |
||
70 | * @param \Ratchet\ConnectionInterface $connection |
||
71 | * @return void |
||
72 | */ |
||
73 | public function onClose(ConnectionInterface $connection) |
||
77 | |||
78 | /** |
||
79 | * Handle HTTP errors. |
||
80 | * |
||
81 | * @param \Ratchet\ConnectionInterface $connection |
||
82 | * @param Exception $exception |
||
83 | * @return void |
||
84 | */ |
||
85 | public function onError(ConnectionInterface $connection, Exception $exception) |
||
99 | } |
||
100 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.