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