diff --git a/src/Annotation/Access.php b/src/Annotation/Access.php index 0860e287e..d32d7a526 100644 --- a/src/Annotation/Access.php +++ b/src/Annotation/Access.php @@ -15,7 +15,7 @@ final class Access implements Annotation /** * Field access. * - * @required + * @Required * * @var string */ diff --git a/src/Annotation/Arg.php b/src/Annotation/Arg.php index 8f3656cdb..26fcce08e 100644 --- a/src/Annotation/Arg.php +++ b/src/Annotation/Arg.php @@ -15,7 +15,7 @@ final class Arg implements Annotation /** * Argument name. * - * @required + * @Required * * @var string */ @@ -31,7 +31,7 @@ final class Arg implements Annotation /** * Argument type. * - * @required + * @Required * * @var string */ diff --git a/src/Annotation/Deprecated.php b/src/Annotation/Deprecated.php index 0f62c13b6..6c77e37e2 100644 --- a/src/Annotation/Deprecated.php +++ b/src/Annotation/Deprecated.php @@ -15,7 +15,7 @@ final class Deprecated implements Annotation /** * The deprecation reason. * - * @required + * @Required * * @var string */ diff --git a/src/Annotation/Description.php b/src/Annotation/Description.php index 49833e216..23ddcd746 100644 --- a/src/Annotation/Description.php +++ b/src/Annotation/Description.php @@ -15,7 +15,7 @@ final class Description implements Annotation /** * The object description. * - * @required + * @Required * * @var string */ diff --git a/src/Annotation/Field.php b/src/Annotation/Field.php index 04e162a3d..269ddd356 100644 --- a/src/Annotation/Field.php +++ b/src/Annotation/Field.php @@ -20,8 +20,6 @@ class Field implements Annotation /** * Field Type. * - * @required - * * @var string */ public $type; diff --git a/src/Annotation/FieldsBuilder.php b/src/Annotation/FieldsBuilder.php index 15be1cfdf..431e38dbb 100644 --- a/src/Annotation/FieldsBuilder.php +++ b/src/Annotation/FieldsBuilder.php @@ -15,7 +15,7 @@ final class FieldsBuilder implements Annotation /** * Builder name. * - * @required + * @Required * * @var string */ diff --git a/src/Annotation/IsPublic.php b/src/Annotation/IsPublic.php index 038ad523e..f6ea4a728 100644 --- a/src/Annotation/IsPublic.php +++ b/src/Annotation/IsPublic.php @@ -15,7 +15,7 @@ final class IsPublic implements Annotation /** * Field publicity. * - * @required + * @Required * * @var string */ diff --git a/src/Annotation/Relay/Edge.php b/src/Annotation/Relay/Edge.php index 9889fb815..b92df2f59 100644 --- a/src/Annotation/Relay/Edge.php +++ b/src/Annotation/Relay/Edge.php @@ -17,7 +17,7 @@ final class Edge extends Type /** * Edge Node type. * - * @required + * @Required * * @var string */ diff --git a/src/Annotation/TypeInterface.php b/src/Annotation/TypeInterface.php index 7b740fc3d..06eb5f56c 100644 --- a/src/Annotation/TypeInterface.php +++ b/src/Annotation/TypeInterface.php @@ -22,7 +22,7 @@ final class TypeInterface implements Annotation /** * Resolver type for interface. * - * @required + * @Required * * @var string */ diff --git a/src/Annotation/Union.php b/src/Annotation/Union.php index 14eab95d3..4e19d18f6 100644 --- a/src/Annotation/Union.php +++ b/src/Annotation/Union.php @@ -22,7 +22,7 @@ final class Union implements Annotation /** * Union types. * - * @required + * @Required * * @var array */ diff --git a/src/Config/Parser/AnnotationParser.php b/src/Config/Parser/AnnotationParser.php index 49a83a4ba..8bc3469ef 100644 --- a/src/Config/Parser/AnnotationParser.php +++ b/src/Config/Parser/AnnotationParser.php @@ -694,7 +694,7 @@ private static function getGraphQLFieldsFromProviders(string $namespace, string $currentValue = \sprintf("service('%s')", self::formatNamespaceForExpression($className)); $providerFields = self::getGraphQLFieldsFromAnnotations($namespace, $filteredMethods, false, true, $currentValue, $annotationName); foreach ($providerFields as $fieldName => $fieldConfig) { - if ($providerAnnotation->prefix) { + if (isset($providerAnnotation->prefix)) { $fieldName = \sprintf('%s%s', $providerAnnotation->prefix, $fieldName); } diff --git a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidAccess.php b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidAccess.php index af47e3a83..e7d7ae663 100644 --- a/tests/Config/Parser/fixtures/annotations/Invalid/InvalidAccess.php +++ b/tests/Config/Parser/fixtures/annotations/Invalid/InvalidAccess.php @@ -12,7 +12,7 @@ class InvalidAccess { /** - * @GQL\Access() + * @GQL\Access("access") */ protected $field; }