Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | 1 | public function toSimpleArray() |
|
15 | { |
||
16 | 1 | $return = array(); |
|
17 | |||
18 | 1 | foreach ($this as $config) { |
|
19 | 1 | $data = $config->toCleanArray(); |
|
20 | 1 | if (isset($data['simple_collection'])) { |
|
21 | 1 | $simpleCollection = $data['simple_collection']; |
|
22 | 1 | unset($data['simple_collection']); |
|
23 | |||
24 | 1 | foreach ($simpleCollection as $simple) { |
|
25 | 1 | $return[] = array_merge($simple->toCleanArray(), $data); |
|
26 | 1 | } |
|
27 | 1 | } |
|
28 | 1 | } |
|
29 | |||
30 | 1 | return $return; |
|
31 | } |
||
32 | } |
||
33 |