diff --git a/composer.json b/composer.json index 8084e4a..37174b2 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require-dev": { "ergebnis/composer-normalize": "^2.11", "jangregor/phpstan-prophecy": "^1", - "mll-lab/php-cs-fixer-config": "^5", + "mll-lab/php-cs-fixer-config": "^4", "orchestra/testbench": "~3.6.0 || ~3.7.0 || ~3.8.0 || ~3.9.0 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 || ^9.x-dev", "phpstan/extension-installer": "^1", "phpstan/phpstan": "^1", diff --git a/src/BadRequestGraphQLException.php b/src/BadRequestGraphQLException.php index 5c77ba4..d94b8e1 100644 --- a/src/BadRequestGraphQLException.php +++ b/src/BadRequestGraphQLException.php @@ -4,4 +4,6 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -class BadRequestGraphQLException extends BadRequestHttpException {} +class BadRequestGraphQLException extends BadRequestHttpException +{ +} diff --git a/src/RequestParser.php b/src/RequestParser.php index 1844278..dd4616f 100644 --- a/src/RequestParser.php +++ b/src/RequestParser.php @@ -33,7 +33,7 @@ public function __construct() public function parseRequest(Request $request) { $method = $request->getMethod(); - $bodyParams = $method === 'POST' + $bodyParams = 'POST' === $method ? $this->bodyParams($request) : []; /** @var array $queryParams Laravel type is not precise enough */ @@ -100,7 +100,7 @@ protected function bodyParams(Request $request): array protected function inlineFiles(Request $request): array { $mapParam = $request->post('map'); - if ($mapParam === null) { + if (null === $mapParam) { throw new BadMultipartRequestGraphQLException('Missing parameter map.'); } if (! is_string($mapParam)) { @@ -109,7 +109,7 @@ protected function inlineFiles(Request $request): array } $operationsParam = $request->post('operations'); - if ($operationsParam === null) { + if (null === $operationsParam) { throw new BadMultipartRequestGraphQLException('Missing parameter operations.'); } if (! is_string($operationsParam)) {