Conditions | 3 |
Paths | 4 |
Total Lines | 33 |
Code Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
53 | public function work(callable $stream) |
||
54 | { |
||
55 | $connection = new Connection(); |
||
56 | $channel = $connection->channel(); |
||
57 | |||
58 | $channel->queue_declare( |
||
59 | $this->queue->getName(), |
||
60 | $this->queue->isPassive(), |
||
61 | $this->queue->isDurable(), |
||
62 | $this->queue->isExclusive(), |
||
63 | $this->queue->isAutoDelete() |
||
64 | ); |
||
65 | |||
66 | $stream('[*] Waiting for messages. To exit press CTRL+C'); |
||
67 | |||
68 | foreach ($this->callbacks as $callback) { |
||
69 | $channel->basic_consume( |
||
70 | $this->queue->getName(), |
||
71 | '', |
||
72 | false, |
||
73 | true, |
||
74 | false, |
||
75 | false, |
||
76 | $callback |
||
77 | ); |
||
78 | } |
||
79 | |||
80 | while (count($channel->callbacks)) { |
||
81 | $channel->wait(); |
||
82 | } |
||
83 | |||
84 | $channel->close(); |
||
85 | $connection->close(); |
||
86 | } |
||
88 |
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.