1 | <?php |
||
8 | class RoundRobinQueue implements Queue |
||
9 | { |
||
10 | /** |
||
11 | * @var Queue[] |
||
12 | */ |
||
13 | protected $queues; |
||
14 | |||
15 | /** |
||
16 | * @var bool |
||
17 | */ |
||
18 | protected $closed; |
||
19 | |||
20 | /** |
||
21 | * @var \SplObjectStorage |
||
22 | */ |
||
23 | protected $envelopes; |
||
24 | |||
25 | /** |
||
26 | * @param Queue[] $queues |
||
27 | */ |
||
28 | 11 | public function __construct(array $queues) |
|
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | 8 | public function enqueue(Envelope $envelope) |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 5 | public function dequeue() |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 1 | public function close() |
|
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | 1 | public function peek($index = 0, $limit = 20) |
|
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | 1 | public function acknowledge(Envelope $envelope) |
|
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | 1 | public function __toString() |
|
147 | |||
148 | /** |
||
149 | * @return int |
||
150 | */ |
||
151 | 1 | public function count() |
|
155 | |||
156 | /** |
||
157 | * @param Queue[] $queues |
||
158 | */ |
||
159 | 11 | protected function validateQueues(array $queues) |
|
175 | |||
176 | /** |
||
177 | * @param Queue[] $queues |
||
178 | * |
||
179 | * @return Queue[] |
||
180 | */ |
||
181 | 11 | protected function indexQueues(array $queues) |
|
193 | |||
194 | /** |
||
195 | * @param Envelope $envelope |
||
196 | */ |
||
197 | 8 | protected function verifyEnvelope(Envelope $envelope) |
|
205 | } |
||
206 |
This check looks for
for
loops that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.Consider removing the loop.