Conditions | 3 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | 10 | public function parseResponse($responseLine, $responseData) |
|
50 | { |
||
51 | 10 | $workflows = []; |
|
52 | 10 | if (isset($responseData['workflow'])) { |
|
53 | 10 | foreach ($responseData['workflow'] as $workflow) { |
|
54 | 10 | $workflow = $workflow['@attributes'] ?? $workflow; |
|
55 | $object = new Workflow($workflow['name'], $workflow['group'], new ArrayCollection([]), $workflow['comment']); |
||
56 | 10 | $object |
|
57 | 10 | ->setId($workflow['id']) |
|
58 | 10 | ->setBoundToSchedule((int) $workflow['bound-to-schedule']) |
|
59 | 10 | ->setLastcommit((int) $workflow['lastcommit']) |
|
60 | ->setModified((int) $workflow['modified']) |
||
61 | 10 | ; |
|
62 | $workflows[] = $object; |
||
63 | 10 | } |
|
64 | } |
||
65 | return new ArrayCollection($workflows); |
||
66 | } |
||
68 |