Skip to content

Commit aeb73a2

Browse files
authored
Merge pull request #911 from ruudk/fix-phpstan
Fix PHPStan error
2 parents ef90e6b + 9f58c32 commit aeb73a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Config/Parser/GraphQLParser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use GraphQL\Language\AST\NodeKind;
1212
use GraphQL\Language\AST\ObjectTypeDefinitionNode;
1313
use GraphQL\Language\Parser;
14+
use Overblog\GraphQLBundle\Config\Parser\GraphQL\ASTConverter\NodeInterface;
1415
use SplFileInfo;
1516
use Symfony\Component\Config\Resource\FileResource;
1617
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -59,6 +60,9 @@ public static function parse(SplFileInfo $file, ContainerBuilder $container, arr
5960
* @var ObjectTypeDefinitionNode|InputObjectTypeDefinitionNode|EnumTypeDefinitionNode $typeDef
6061
*/
6162
if (isset($typeDef->kind) && in_array($typeDef->kind, array_keys(self::DEFINITION_TYPE_MAPPING))) {
63+
/**
64+
* @var class-string<NodeInterface> $class
65+
*/
6266
$class = sprintf('\\%s\\GraphQL\\ASTConverter\\%sNode', __NAMESPACE__, ucfirst(self::DEFINITION_TYPE_MAPPING[$typeDef->kind]));
6367
$typesConfig[$typeDef->name->value] = call_user_func([$class, 'toConfig'], $typeDef);
6468
} else {

0 commit comments

Comments
 (0)