Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
48 | 1 | public function parseResponse($responseLine, $responseData) |
|
49 | { |
||
50 | 1 | $responseData = $responseData['queue']; |
|
51 | 1 | $queues = []; |
|
52 | 1 | foreach ($responseData as $queue) { |
|
53 | 1 | $queue = $queue['@attributes'] ?? $queue; |
|
54 | 1 | $queueObject = new Tube($queue['name'], $queue['concurrency']); |
|
55 | $queueObject |
||
56 | 1 | ->setId($queue['id']) |
|
57 | 1 | ->setDynamic($queue['dynamic']) |
|
58 | 1 | ->setScheduler($queue['scheduler']) |
|
59 | ; |
||
60 | 1 | $queues[] = $queueObject; |
|
61 | } |
||
62 | |||
63 | 1 | return new ArrayCollection($queues); |
|
|
|||
64 | } |
||
66 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: