Cleanup code, improve typings

This commit is contained in:
ErickSkrauch
2019-12-13 22:27:13 +03:00
parent 830a17612b
commit d9ef27b745
28 changed files with 189 additions and 225 deletions

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
namespace api\request;
use Yii;
@@ -18,7 +20,14 @@ use yii\web\RequestParserInterface;
*/
class RequestParser implements RequestParserInterface {
public function parse($rawBody, $contentType) {
/**
* @param string $rawBody
* @param string $contentType
*
* @return array
* @throws \yii\web\BadRequestHttpException
*/
public function parse($rawBody, $contentType): array {
if (!empty($_POST)) {
return $_POST;
}