Skip to content

Commit 7c6be8c

Browse files
committed
Ignore known phpstan warnings
1 parent e66676e commit 7c6be8c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Config/Parser/AnnotationParser.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ private static function getGraphQLInputFieldsFromAnnotations(GraphClass $graphCl
642642
if ($reflector instanceof ReflectionProperty) {
643643
if ($reflector->hasType()) {
644644
try {
645+
// @phpstan-ignore-next-line
645646
$fieldType = self::resolveGraphQLTypeFromReflectionType($reflector->getType(), self::VALID_INPUT_TYPES);
646647
} catch (Exception $e) {
647648
throw new InvalidArgumentException(sprintf('The attribute "type" on GraphQL annotation "@%s" is missing on property "%s" and cannot be auto-guessed from type hint "%s"', GQL\Field::class, $reflector->getName(), (string) $reflector->getType()));

tests/Config/Parser/fixtures/annotations/Input/Planet.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Planet
3232
* @GQL\Field
3333
* @ORM\Column(type="integer", nullable=true)
3434
*/
35+
// @phpstan-ignore-next-line
3536
protected $diameter;
3637

3738
/**
@@ -40,5 +41,6 @@ class Planet
4041
*/
4142
protected int $variable;
4243

44+
// @phpstan-ignore-next-line
4345
protected $dummy;
4446
}

0 commit comments

Comments
 (0)