diff --git a/composer.json b/composer.json index 495d02dce..19994c52e 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "1.11.7", + "phpstan/phpstan": "1.11.8", "phpstan/phpstan-phpunit": "1.4.0", "phpstan/phpstan-strict-rules": "1.6.0", "phpunit/phpunit": "^9.5 || ^10.5.21", diff --git a/src/Executor/ReferenceExecutor.php b/src/Executor/ReferenceExecutor.php index 98d15f3b9..7554f1337 100644 --- a/src/Executor/ReferenceExecutor.php +++ b/src/Executor/ReferenceExecutor.php @@ -772,9 +772,7 @@ protected function completeValueCatchingError( try { $promise = $this->getPromise($result); if ($promise !== null) { - $completed = $promise->then(function (&$resolved) use ($contextValue, $returnType, $fieldNodes, $info, $path, $unaliasedPath) { - return $this->completeValue($returnType, $fieldNodes, $info, $path, $unaliasedPath, $resolved, $contextValue); - }); + $completed = $promise->then(fn (&$resolved) => $this->completeValue($returnType, $fieldNodes, $info, $path, $unaliasedPath, $resolved, $contextValue)); } else { $completed = $this->completeValue($returnType, $fieldNodes, $info, $path, $unaliasedPath, $result, $contextValue); } diff --git a/src/Validator/Rules/UniqueOperationNames.php b/src/Validator/Rules/UniqueOperationNames.php index 281cc5877..3eb21a26c 100644 --- a/src/Validator/Rules/UniqueOperationNames.php +++ b/src/Validator/Rules/UniqueOperationNames.php @@ -36,9 +36,7 @@ public function getVisitor(QueryValidationContext $context): array return Visitor::skipNode(); }, - NodeKind::FRAGMENT_DEFINITION => static function (): VisitorOperation { - return Visitor::skipNode(); - }, + NodeKind::FRAGMENT_DEFINITION => static fn (): VisitorOperation => Visitor::skipNode(), ]; } diff --git a/tests/StarWarsSchema.php b/tests/StarWarsSchema.php index a2db75671..913cc1c16 100644 --- a/tests/StarWarsSchema.php +++ b/tests/StarWarsSchema.php @@ -175,9 +175,7 @@ public static function build(): Schema $fieldSelection['id'] = true; return \array_map( - static function ($friend) use ($fieldSelection): array { - return \array_intersect_key($friend, $fieldSelection); - }, + static fn ($friend): array => \array_intersect_key($friend, $fieldSelection), StarWarsData::friends($human) ); },