Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | 5 | public function parseInput(array $input): array |
|
14 | { |
||
15 | 5 | $trimArray = []; |
|
16 | 5 | foreach ($input as $key => $value) { |
|
17 | 5 | if (is_array($value)) { |
|
18 | 5 | $trimArray[$this->removeNullBytes($key)] = $this->parseInput($value); |
|
19 | } else { |
||
20 | 5 | $trimArray[$this->removeNullBytes($key)] = $this->removeNullBytes(trim(strval($value))); |
|
21 | } |
||
22 | } |
||
23 | // @phpstan-ignore-next-line |
||
24 | 5 | return $trimArray; |
|
25 | } |
||
27 |