Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Feb 23, 2024
1 parent cf24372 commit 39c6f6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/BadRequestGraphQLException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

class BadRequestGraphQLException extends BadRequestHttpException {}
class BadRequestGraphQLException extends BadRequestHttpException
{
}
6 changes: 3 additions & 3 deletions src/RequestParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, mixed> $queryParams Laravel type is not precise enough */
Expand Down Expand Up @@ -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)) {
Expand All @@ -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)) {
Expand Down

0 comments on commit 39c6f6d

Please sign in to comment.