@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | foreach ($definedDirectives as $directive) { |
| 47 | 47 | $requiredArgsMap[$directive->name] = Utils::keyMap( |
| 48 | - array_filter($directive->args, static function (FieldArgument $arg) : bool { |
|
| 49 | - return $arg->getType() instanceof NonNull && ! isset($arg->defaultValue); |
|
| 48 | + array_filter($directive->args, static function(FieldArgument $arg) : bool { |
|
| 49 | + return $arg->getType() instanceof NonNull && !isset($arg->defaultValue); |
|
| 50 | 50 | }), |
| 51 | - static function (FieldArgument $arg) : string { |
|
| 51 | + static function(FieldArgument $arg) : string { |
|
| 52 | 52 | return $arg->name; |
| 53 | 53 | } |
| 54 | 54 | ); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | $astDefinition = $context->getDocument()->definitions; |
| 58 | 58 | foreach ($astDefinition as $def) { |
| 59 | - if (! ($def instanceof DirectiveDefinitionNode)) { |
|
| 59 | + if (!($def instanceof DirectiveDefinitionNode)) { |
|
| 60 | 60 | continue; |
| 61 | 61 | } |
| 62 | 62 | |
@@ -70,32 +70,32 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | $requiredArgsMap[$def->name->value] = Utils::keyMap( |
| 72 | 72 | $arguments |
| 73 | - ? array_filter($arguments, static function (Node $argument) : bool { |
|
| 73 | + ? array_filter($arguments, static function(Node $argument) : bool { |
|
| 74 | 74 | return $argument instanceof NonNullTypeNode && |
| 75 | 75 | ( |
| 76 | - ! isset($argument->defaultValue) || |
|
| 76 | + !isset($argument->defaultValue) || |
|
| 77 | 77 | $argument->defaultValue === null |
| 78 | 78 | ); |
| 79 | 79 | }) |
| 80 | 80 | : [], |
| 81 | - static function (NamedTypeNode $argument) : string { |
|
| 81 | + static function(NamedTypeNode $argument) : string { |
|
| 82 | 82 | return $argument->name->value; |
| 83 | 83 | } |
| 84 | 84 | ); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | return [ |
| 88 | - NodeKind::DIRECTIVE => static function (DirectiveNode $directiveNode) use ($requiredArgsMap, $context) { |
|
| 88 | + NodeKind::DIRECTIVE => static function(DirectiveNode $directiveNode) use ($requiredArgsMap, $context) { |
|
| 89 | 89 | $directiveName = $directiveNode->name->value; |
| 90 | 90 | $requiredArgs = $requiredArgsMap[$directiveName] ?? null; |
| 91 | - if (! $requiredArgs) { |
|
| 91 | + if (!$requiredArgs) { |
|
| 92 | 92 | return null; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $argNodes = $directiveNode->arguments ?: []; |
| 96 | 96 | $argNodeMap = Utils::keyMap( |
| 97 | 97 | $argNodes, |
| 98 | - static function (ArgumentNode $arg) : string { |
|
| 98 | + static function(ArgumentNode $arg) : string { |
|
| 99 | 99 | return $arg->name->value; |
| 100 | 100 | } |
| 101 | 101 | ); |