Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.0218 |
Changes | 0 |
1 | <?php |
||
50 | 12 | protected function normalizeParams(array $formData): array |
|
51 | { |
||
52 | 12 | $formParams = []; |
|
53 | 12 | foreach ($formData as $key => $value) { |
|
54 | 11 | if (empty($value)) { |
|
55 | 5 | continue; |
|
56 | } |
||
57 | |||
58 | 11 | $formParams[$key] = (is_array($value)) |
|
59 | ? join(',', $value) |
||
60 | 11 | : $value |
|
61 | ; |
||
62 | } |
||
63 | |||
64 | 12 | return $formParams; |
|
65 | } |
||
66 | } |