Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 4 | public function transform($formData = [], ContextInterface $context = null): array |
|
15 | { |
||
16 | 4 | if (empty($formData)) { |
|
17 | return []; |
||
18 | } |
||
19 | |||
20 | 4 | if (\is_object($formData)) { |
|
21 | 1 | return $this->normalizeObject($formData, $context); |
|
22 | } |
||
23 | |||
24 | 3 | array_walk_recursive($formData, [&$this, 'serializeObjects'], $context); |
|
25 | |||
26 | 3 | return $formData; |
|
27 | } |
||
67 |