1 | <?php |
||
19 | class Wire implements WireInterface, LoggerAwareInterface |
||
20 | { |
||
21 | const PROTOCOL_HEADER = "AMQP\x00\x00\x09\x01"; |
||
22 | const FRAME_ENDING = "\xCE"; |
||
23 | |||
24 | use LoggerAwareTrait; |
||
25 | |||
26 | /** |
||
27 | * @var IOInterface |
||
28 | */ |
||
29 | private $io; |
||
30 | |||
31 | /** |
||
32 | * @var WireSubscriberInterface[] |
||
33 | */ |
||
34 | private $subscribers = []; |
||
35 | |||
36 | /** |
||
37 | * @var HeartbeatInterface |
||
38 | */ |
||
39 | private $heartbeat; |
||
40 | |||
41 | /** |
||
42 | * @var int |
||
43 | */ |
||
44 | private $frameMax; |
||
45 | |||
46 | /** |
||
47 | * @param IOInterface $io |
||
48 | */ |
||
49 | 33 | public function __construct(IOInterface $io) |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 19 | public function open(Url $url) |
|
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | 28 | public function next($blocking = true) |
|
110 | |||
111 | /** |
||
112 | * @param Frame $frame |
||
113 | */ |
||
114 | 23 | private function dispatch(Frame $frame) |
|
120 | |||
121 | /** |
||
122 | * {@inheritdoc} |
||
123 | */ |
||
124 | 22 | public function send(Frame $frame) |
|
134 | |||
135 | /** |
||
136 | * @param Frame $frame |
||
137 | * |
||
138 | * @return array |
||
139 | */ |
||
140 | 22 | private function chop(Frame $frame) |
|
157 | |||
158 | /** |
||
159 | * {@inheritdoc} |
||
160 | */ |
||
161 | 20 | public function wait($channel, $types) |
|
181 | |||
182 | /** |
||
183 | * @param Frame $frame |
||
184 | * @param array $types |
||
185 | * |
||
186 | * @return bool |
||
187 | */ |
||
188 | 20 | private function isFrameOneOf(Frame $frame, array $types) |
|
192 | |||
193 | /** |
||
194 | * {@inheritdoc} |
||
195 | */ |
||
196 | 19 | public function subscribe($channel, WireSubscriberInterface $handler) |
|
202 | |||
203 | /** |
||
204 | * {@inheritdoc} |
||
205 | */ |
||
206 | 8 | public function close() |
|
212 | |||
213 | /** |
||
214 | * @param HeartbeatInterface $heartbeat |
||
215 | * |
||
216 | * @return $this |
||
217 | */ |
||
218 | 20 | public function setHeartbeat(HeartbeatInterface $heartbeat) |
|
224 | |||
225 | /** |
||
226 | * @param int $frameMax |
||
227 | * |
||
228 | * @return $this |
||
229 | */ |
||
230 | 18 | public function setFrameMax($frameMax) |
|
236 | |||
237 | /** |
||
238 | * @param int $channel |
||
239 | * |
||
240 | * @return WireSubscriberInterface|null |
||
241 | */ |
||
242 | 23 | private function getSubscriber($channel) |
|
246 | |||
247 | /** |
||
248 | * @param Url $url |
||
249 | * |
||
250 | * @return string |
||
251 | */ |
||
252 | 19 | private function getProtocolForScheme(Url $url) |
|
256 | } |
||
257 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.