You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (null !== $accessMetadata || null !== $publicMetadata) {
573
571
thrownewInvalidArgumentException(sprintf('The metadatas %s and/or %s defined on "%s" are only usable in addition of metadata %s', self::formatMetadata('Access'), self::formatMetadata('Visible'), $reflector->getName(), self::formatMetadata('Field')));
@@ -576,7 +574,7 @@ private static function getTypeFieldConfigurationFromReflector(ReflectionClass $
576
574
return [];
577
575
}
578
576
579
-
if ($isMethod && !$reflector->isPublic()) {
577
+
if ($reflectorinstanceof ReflectionMethod && !$reflector->isPublic()) {
580
578
thrownewInvalidArgumentException(sprintf('The metadata %s can only be applied to public method. The method "%s" is not public.', self::formatMetadata('Field'), $reflector->getName()));
581
579
}
582
580
@@ -594,10 +592,10 @@ private static function getTypeFieldConfigurationFromReflector(ReflectionClass $
if ($isMethod && !in_array($arg->name, $validArgNames, true)) {
598
+
if ($reflectorinstanceof ReflectionMethod && !in_array($arg->name, $validArgNames, true)) {
601
599
thrownewInvalidArgumentException(sprintf('The argument "%s" defined with #[GQL\Arg] attribute/annotation on method "%s" does not match any parameter name in the method.', $arg->name, $reflector->getName()));
602
600
}
603
601
@@ -615,7 +613,7 @@ private static function getTypeFieldConfigurationFromReflector(ReflectionClass $
0 commit comments