Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 2 | public function jsonSerialize() |
|
33 | { |
||
34 | 2 | $result = []; |
|
35 | |||
36 | 2 | $items = parent::jsonSerialize(); |
|
37 | |||
38 | /** @var Sample $item */ |
||
39 | 2 | foreach ($items as $item) { |
|
40 | 2 | $result = array_merge( |
|
41 | 2 | $result, |
|
42 | 2 | (array) json_decode( |
|
43 | 2 | (string) json_encode($item), |
|
44 | true |
||
45 | 2 | ) |
|
46 | 2 | ); |
|
47 | 2 | } |
|
48 | |||
49 | 2 | return $result; |
|
50 | } |
||
52 |