Total Complexity | 5 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 5 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class JsonParser extends \yii\web\JsonParser |
||
16 | { |
||
17 | /** |
||
18 | * @inheritdoc |
||
19 | */ |
||
20 | public function parse($rawBody, $contentType) |
||
21 | { |
||
22 | $bodyParams = parent::parse($rawBody, $contentType); |
||
23 | $bodyParams = $this->filterNullValuesFromArray($bodyParams); |
||
24 | return $bodyParams; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Filters null values from an array. |
||
29 | * @param array $arr |
||
30 | * @return array |
||
31 | */ |
||
32 | public function filterNullValuesFromArray(array $arr): array |
||
44 | } |
||
45 | } |
||
46 |