@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | // Note: Skip type loading if type is part of type template parameter. |
111 | 111 | // |
112 | 112 | case $node instanceof NamedTypeNode: |
113 | - if (! \in_array($node->name->value, $this->genericArguments, true)) { |
|
113 | + if (!\in_array($node->name->value, $this->genericArguments, true)) { |
|
114 | 114 | $this->assertTypeExists($node); |
115 | 115 | } |
116 | 116 | |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | */ |
132 | 132 | private function assertTypeExists(NamedTypeNode $name): void |
133 | 133 | { |
134 | - if (! $this->context->hasType($name->name->value)) { |
|
135 | - $this->loadOr($name->name->value, function () use ($name): void { |
|
134 | + if (!$this->context->hasType($name->name->value)) { |
|
135 | + $this->loadOr($name->name->value, function() use ($name): void { |
|
136 | 136 | throw $this->typeNotFound($name); |
137 | 137 | }); |
138 | 138 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $context = $this->context->getDirective($name->name->value); |
184 | 184 | |
185 | 185 | if ($context === null) { |
186 | - $this->loadOr('@' . $name->name->value, function () use ($name): void { |
|
186 | + $this->loadOr('@' . $name->name->value, function() use ($name): void { |
|
187 | 187 | throw $this->directiveNotFound($name); |
188 | 188 | }); |
189 | 189 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | /** |
24 | 24 | * @var array|string[] |
25 | 25 | */ |
26 | - private ?array $genericArguments = null; |
|
26 | + private ? array $genericArguments = null; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * {@inheritDoc} |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $name = $node->name->value; |
73 | 73 | $arguments = $this->refArguments($node, $args); |
74 | 74 | |
75 | - $index = \array_search($name,$this->getGenericArguments(), true); |
|
75 | + $index = \array_search($name, $this->getGenericArguments(), true); |
|
76 | 76 | |
77 | 77 | if (\is_int($index)) { |
78 | 78 | $name = $args[$index]; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | protected function descriptionOf(Node $node): ?string |
27 | 27 | { |
28 | - if (! \property_exists($node, 'description')) { |
|
28 | + if (!\property_exists($node, 'description')) { |
|
29 | 29 | return null; |
30 | 30 | } |
31 | 31 |
@@ -137,7 +137,7 @@ |
||
137 | 137 | { |
138 | 138 | $generic = $this->resolver->resolve($name, $args); |
139 | 139 | |
140 | - if (! $this->ctx->hasType($generic)) { |
|
140 | + if (!$this->ctx->hasType($generic)) { |
|
141 | 141 | $context = $this->getContext($from, $name, $args); |
142 | 142 | |
143 | 143 | $schema = $this->ctx->getSchema(); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public static function assert(NodeInterface $node, SpecificationInterface $spec): void |
30 | 30 | { |
31 | - if (! $node instanceof TypeName) { |
|
31 | + if (!$node instanceof TypeName) { |
|
32 | 32 | return; |
33 | 33 | } |
34 | 34 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public static function assert(NodeInterface $node, SpecificationInterface $spec): void |
30 | 30 | { |
31 | - if (! $node instanceof VariableValueNode) { |
|
31 | + if (!$node instanceof VariableValueNode) { |
|
32 | 32 | return; |
33 | 33 | } |
34 | 34 |
@@ -40,6 +40,6 @@ |
||
40 | 40 | */ |
41 | 41 | public static function create(array $children): array |
42 | 42 | { |
43 | - return \array_map(fn (NamedTypeNode $type): self => new static($type), $children); |
|
43 | + return \array_map(fn(NamedTypeNode $type): self => new static($type), $children); |
|
44 | 44 | } |
45 | 45 | } |
@@ -744,49 +744,49 @@ discard block |
||
744 | 744 | * |
745 | 745 | */ |
746 | 746 | 'reducers' => [ |
747 | - 2 => static function ($children) { |
|
747 | + 2 => static function($children) { |
|
748 | 748 | return Ast\TypeName::create($children); |
749 | 749 | }, |
750 | - 5 => static function ($children) { |
|
750 | + 5 => static function($children) { |
|
751 | 751 | return Ast\TypeName::create($children); |
752 | 752 | }, |
753 | - 1 => static function ($children) { |
|
753 | + 1 => static function($children) { |
|
754 | 754 | return Ast\Identifier::create($children); |
755 | 755 | }, |
756 | - 33 => static function ($children) { |
|
756 | + 33 => static function($children) { |
|
757 | 757 | return Ast\Description::create($children ?: null); |
758 | 758 | }, |
759 | - 35 => static function ($children) { |
|
759 | + 35 => static function($children) { |
|
760 | 760 | return Ast\Type\ListTypeNode::create($children); |
761 | 761 | }, |
762 | - 34 => static function ($children) { |
|
762 | + 34 => static function($children) { |
|
763 | 763 | return Ast\Type\NonNullTypeNode::create($children); |
764 | 764 | }, |
765 | - 36 => static function ($children) { |
|
765 | + 36 => static function($children) { |
|
766 | 766 | return Ast\Type\NamedTypeNode::create($children); |
767 | 767 | }, |
768 | - 51 => static function ($children) { |
|
768 | + 51 => static function($children) { |
|
769 | 769 | return Ast\Type\NamedDirectiveNode::create($children); |
770 | 770 | }, |
771 | - 54 => static function ($children) { |
|
771 | + 54 => static function($children) { |
|
772 | 772 | return Value\BooleanValue::parse($children->getName() === 'T_TRUE'); |
773 | 773 | }, |
774 | - 55 => static function ($children) { |
|
774 | + 55 => static function($children) { |
|
775 | 775 | return Value\EnumValue::parse($children[0]->value); |
776 | 776 | }, |
777 | - 58 => static function ($children) { |
|
777 | + 58 => static function($children) { |
|
778 | 778 | return Value\FloatValue::parse($children->getValue()); |
779 | 779 | }, |
780 | - 59 => static function ($children) { |
|
780 | + 59 => static function($children) { |
|
781 | 781 | return Value\IntValue::parse($children->getValue()); |
782 | 782 | }, |
783 | - 67 => static function ($children) { |
|
783 | + 67 => static function($children) { |
|
784 | 784 | return Value\ListValue::parse($children); |
785 | 785 | }, |
786 | - 68 => static function ($children) { |
|
786 | + 68 => static function($children) { |
|
787 | 787 | return Value\NullValue::parse(null); |
788 | 788 | }, |
789 | - 76 => static function ($children) { |
|
789 | + 76 => static function($children) { |
|
790 | 790 | $result = []; |
791 | 791 | |
792 | 792 | for ($i = 0, $count = \count((array)$children); $i < $count; $i += 2) { |
@@ -795,91 +795,91 @@ discard block |
||
795 | 795 | |
796 | 796 | return Value\InputObjectValue::parse($result); |
797 | 797 | }, |
798 | - 77 => static function ($children) { |
|
798 | + 77 => static function($children) { |
|
799 | 799 | return Value\StringValue::parse(\substr($children->getValue(), 3, -3)); |
800 | 800 | }, |
801 | - 78 => static function ($children) { |
|
801 | + 78 => static function($children) { |
|
802 | 802 | return Value\StringValue::parse(\substr($children->getValue(), 1, -1)); |
803 | 803 | }, |
804 | - 79 => static function ($children) { |
|
804 | + 79 => static function($children) { |
|
805 | 805 | return Ast\Value\VariableValueNode::parse($children[0]->getValue()); |
806 | 806 | }, |
807 | - 83 => static function ($children) { |
|
807 | + 83 => static function($children) { |
|
808 | 808 | return Ast\Extension\SchemaExtensionNode::create($children); |
809 | 809 | }, |
810 | - 86 => static function ($children) { |
|
810 | + 86 => static function($children) { |
|
811 | 811 | return Ast\Extension\Type\EnumTypeExtensionNode::create($children); |
812 | 812 | }, |
813 | - 89 => static function ($children) { |
|
813 | + 89 => static function($children) { |
|
814 | 814 | return Ast\Extension\Type\InputObjectTypeExtensionNode::create($children); |
815 | 815 | }, |
816 | - 92 => static function ($children) { |
|
816 | + 92 => static function($children) { |
|
817 | 817 | return Ast\Extension\Type\InterfaceTypeExtensionNode::create($children); |
818 | 818 | }, |
819 | - 95 => static function ($children) { |
|
819 | + 95 => static function($children) { |
|
820 | 820 | return Ast\Extension\Type\ObjectTypeExtensionNode::create($children); |
821 | 821 | }, |
822 | - 98 => static function ($children) { |
|
822 | + 98 => static function($children) { |
|
823 | 823 | return Ast\Extension\Type\ScalarTypeExtensionNode::create($children); |
824 | 824 | }, |
825 | - 101 => static function ($children) { |
|
825 | + 101 => static function($children) { |
|
826 | 826 | return Ast\Extension\Type\UnionTypeExtensionNode::create($children); |
827 | 827 | }, |
828 | - 104 => static function ($children) { |
|
828 | + 104 => static function($children) { |
|
829 | 829 | return Ast\Definition\SchemaDefinitionNode::create($children); |
830 | 830 | }, |
831 | - 111 => static function ($children) { |
|
831 | + 111 => static function($children) { |
|
832 | 832 | return Ast\Definition\OperationTypeDefinitionNode::create($children); |
833 | 833 | }, |
834 | - 125 => static function ($children) { |
|
834 | + 125 => static function($children) { |
|
835 | 835 | return Ast\Definition\DirectiveDefinitionNode::create($children); |
836 | 836 | }, |
837 | - 127 => static function ($children) { |
|
837 | + 127 => static function($children) { |
|
838 | 838 | return Ast\Definition\DirectiveDefinitionIsRepeatableNode::create(); |
839 | 839 | }, |
840 | - 136 => static function ($children) { |
|
840 | + 136 => static function($children) { |
|
841 | 841 | return Ast\Definition\DirectiveDefinitionLocationNode::create($children); |
842 | 842 | }, |
843 | - 132 => static function ($children) { |
|
843 | + 132 => static function($children) { |
|
844 | 844 | return Ast\Definition\ArgumentDefinitionNode::create($children); |
845 | 845 | }, |
846 | - 154 => static function ($children) { |
|
846 | + 154 => static function($children) { |
|
847 | 847 | return Ast\Definition\EnumValueDefinitionNode::create($children); |
848 | 848 | }, |
849 | - 155 => static function ($children) { |
|
849 | + 155 => static function($children) { |
|
850 | 850 | return Ast\Definition\FieldDefinitionNode::create($children); |
851 | 851 | }, |
852 | - 172 => static function ($children) { |
|
852 | + 172 => static function($children) { |
|
853 | 853 | return Ast\Definition\InputFieldDefinitionNode::create($children); |
854 | 854 | }, |
855 | - 175 => static function ($children) { |
|
855 | + 175 => static function($children) { |
|
856 | 856 | return Ast\Definition\Type\EnumTypeDefinitionNode::create($children); |
857 | 857 | }, |
858 | - 184 => static function ($children) { |
|
858 | + 184 => static function($children) { |
|
859 | 859 | return Ast\Definition\Type\InputObjectTypeDefinitionNode::create($children); |
860 | 860 | }, |
861 | - 194 => static function ($children) { |
|
861 | + 194 => static function($children) { |
|
862 | 862 | return Ast\Definition\Type\InterfaceTypeDefinitionNode::create($children); |
863 | 863 | }, |
864 | - 198 => static function ($children) { |
|
864 | + 198 => static function($children) { |
|
865 | 865 | return Ast\Definition\Type\ImplementedInterfaceNode::create($children); |
866 | 866 | }, |
867 | - 212 => static function ($children) { |
|
867 | + 212 => static function($children) { |
|
868 | 868 | return Ast\Definition\Type\ObjectTypeDefinitionNode::create($children); |
869 | 869 | }, |
870 | - 222 => static function ($children) { |
|
870 | + 222 => static function($children) { |
|
871 | 871 | return Ast\Definition\Type\ScalarTypeDefinitionNode::create($children); |
872 | 872 | }, |
873 | - 226 => static function ($children) { |
|
873 | + 226 => static function($children) { |
|
874 | 874 | return Ast\Definition\Type\UnionTypeDefinitionNode::create($children); |
875 | 875 | }, |
876 | - 232 => static function ($children) { |
|
876 | + 232 => static function($children) { |
|
877 | 877 | return Ast\Definition\Type\UnionMemberNode::create($children); |
878 | 878 | }, |
879 | - 108 => static function ($children) { |
|
879 | + 108 => static function($children) { |
|
880 | 880 | return Ast\Executable\DirectiveNode::create($children); |
881 | 881 | }, |
882 | - 244 => static function ($children) { |
|
882 | + 244 => static function($children) { |
|
883 | 883 | return Ast\Executable\ArgumentNode::create($children); |
884 | 884 | } |
885 | 885 | ], |