@@ -58,7 +58,7 @@ |
||
| 58 | 58 | { |
| 59 | 59 | $hash = $this->hash($source = File::new($source)); |
| 60 | 60 | |
| 61 | - if (! $this->cache->has($hash)) { |
|
| 61 | + if (!$this->cache->has($hash)) { |
|
| 62 | 62 | $this->cache->set($hash, $this->parser->parse($source)); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public static function assert(NodeInterface $node, SpecificationInterface $spec): void |
| 34 | 34 | { |
| 35 | - if (! $node instanceof DirectiveDefinitionNode) { |
|
| 35 | + if (!$node instanceof DirectiveDefinitionNode) { |
|
| 36 | 36 | return; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public static function assert(NodeInterface $node, SpecificationInterface $spec): void |
| 34 | 34 | { |
| 35 | - if (! $node instanceof TypeSystemExtensionNode) { |
|
| 35 | + if (!$node instanceof TypeSystemExtensionNode) { |
|
| 36 | 36 | return; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | private function bootConstraints(): void |
| 80 | 80 | { |
| 81 | 81 | foreach (static::STANDARD_CONSTRAINTS as $constraint) { |
| 82 | - if (! \in_array($constraint, $this->abilities, true)) { |
|
| 82 | + if (!\in_array($constraint, $this->abilities, true)) { |
|
| 83 | 83 | $this->constraints[] = $constraint; |
| 84 | 84 | } |
| 85 | 85 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $context = $this->context->getType($name->name->value); |
| 84 | 84 | |
| 85 | 85 | if ($context === null) { |
| 86 | - $this->loadOr($name->name->value, function () use ($name): void { |
|
| 86 | + $this->loadOr($name->name->value, function() use ($name): void { |
|
| 87 | 87 | throw $this->typeNotFound($name); |
| 88 | 88 | }); |
| 89 | 89 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $context = $this->context->getDirective($name->name->value); |
| 133 | 133 | |
| 134 | 134 | if ($context === null) { |
| 135 | - $this->loadOr('@' . $name->name->value, function () use ($name): void { |
|
| 135 | + $this->loadOr('@' . $name->name->value, function() use ($name): void { |
|
| 136 | 136 | throw $this->directiveNotFound($name); |
| 137 | 137 | }); |
| 138 | 138 | } |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | public function cancelAutoload(callable $loader): self |
| 61 | 61 | { |
| 62 | - $this->loaders = \array_filter($this->loaders, static function (callable $haystack) use ($loader): bool { |
|
| 62 | + $this->loaders = \array_filter($this->loaders, static function(callable $haystack) use ($loader): bool { |
|
| 63 | 63 | return $haystack !== $loader; |
| 64 | 64 | }); |
| 65 | 65 | |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | */ |
| 117 | 117 | private function assertExists(VariableValueNode $var): void |
| 118 | 118 | { |
| 119 | - if (! isset($this->variables[$var->getName()])) { |
|
| 119 | + if (!isset($this->variables[$var->getName()])) { |
|
| 120 | 120 | $error = \sprintf('Variable $%s not defined', $var->getName()); |
| 121 | 121 | |
| 122 | 122 | throw new RuntimeErrorException($error, $var); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function __construct(Context $context, Schema $schema, InterfaceTypeDefinitionNode $ast) |
| 35 | 35 | { |
| 36 | - parent::__construct($context, $schema, $ast); |
|
| 36 | + parent::__construct($context, $schema, $ast); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -702,31 +702,31 @@ discard block |
||
| 702 | 702 | * |
| 703 | 703 | */ |
| 704 | 704 | 'reducers' => [ |
| 705 | - 2 => static function ($children) { |
|
| 705 | + 2 => static function($children) { |
|
| 706 | 706 | return Ast\Description::create($children ?: null); |
| 707 | 707 | }, |
| 708 | - 23 => static function ($children) { |
|
| 708 | + 23 => static function($children) { |
|
| 709 | 709 | return Ast\Identifier::create($children); |
| 710 | 710 | }, |
| 711 | - 26 => static function ($children) { |
|
| 711 | + 26 => static function($children) { |
|
| 712 | 712 | return Value\BooleanValue::parse($children->getName() === 'T_TRUE'); |
| 713 | 713 | }, |
| 714 | - 27 => static function ($children) { |
|
| 714 | + 27 => static function($children) { |
|
| 715 | 715 | return Value\EnumValue::parse($children[0]->value); |
| 716 | 716 | }, |
| 717 | - 30 => static function ($children) { |
|
| 717 | + 30 => static function($children) { |
|
| 718 | 718 | return Value\FloatValue::parse($children->getValue()); |
| 719 | 719 | }, |
| 720 | - 31 => static function ($children) { |
|
| 720 | + 31 => static function($children) { |
|
| 721 | 721 | return Value\IntValue::parse($children->getValue()); |
| 722 | 722 | }, |
| 723 | - 39 => static function ($children) { |
|
| 723 | + 39 => static function($children) { |
|
| 724 | 724 | return Value\ListValue::parse($children); |
| 725 | 725 | }, |
| 726 | - 40 => static function ($children) { |
|
| 726 | + 40 => static function($children) { |
|
| 727 | 727 | return Value\NullValue::parse(null); |
| 728 | 728 | }, |
| 729 | - 48 => static function ($children) { |
|
| 729 | + 48 => static function($children) { |
|
| 730 | 730 | $result = []; |
| 731 | 731 | |
| 732 | 732 | for ($i = 0, $count = \count((array)$children); $i < $count; $i += 2) { |
@@ -735,103 +735,103 @@ discard block |
||
| 735 | 735 | |
| 736 | 736 | return Value\InputObjectValue::parse($result); |
| 737 | 737 | }, |
| 738 | - 49 => static function ($children) { |
|
| 738 | + 49 => static function($children) { |
|
| 739 | 739 | return Value\StringValue::parse(\substr($children->getValue(), 3, -3)); |
| 740 | 740 | }, |
| 741 | - 50 => static function ($children) { |
|
| 741 | + 50 => static function($children) { |
|
| 742 | 742 | return Value\StringValue::parse(\substr($children->getValue(), 1, -1)); |
| 743 | 743 | }, |
| 744 | - 51 => static function ($children) { |
|
| 744 | + 51 => static function($children) { |
|
| 745 | 745 | return Ast\Value\VariableValueNode::parse($children[0]->getValue()); |
| 746 | 746 | }, |
| 747 | - 54 => static function ($children) { |
|
| 747 | + 54 => static function($children) { |
|
| 748 | 748 | return Ast\Type\ListTypeNode::create($children); |
| 749 | 749 | }, |
| 750 | - 53 => static function ($children) { |
|
| 750 | + 53 => static function($children) { |
|
| 751 | 751 | return Ast\Type\NonNullTypeNode::create($children); |
| 752 | 752 | }, |
| 753 | - 55 => static function ($children) { |
|
| 753 | + 55 => static function($children) { |
|
| 754 | 754 | return Ast\Type\NamedTypeNode::create($children); |
| 755 | 755 | }, |
| 756 | - 62 => static function ($children) { |
|
| 756 | + 62 => static function($children) { |
|
| 757 | 757 | return Ast\Type\NamedDirectiveNode::create($children); |
| 758 | 758 | }, |
| 759 | - 65 => static function ($children) { |
|
| 759 | + 65 => static function($children) { |
|
| 760 | 760 | return Ast\Extension\SchemaExtensionNode::create($children); |
| 761 | 761 | }, |
| 762 | - 68 => static function ($children) { |
|
| 762 | + 68 => static function($children) { |
|
| 763 | 763 | return Ast\Extension\Type\EnumTypeExtensionNode::create($children); |
| 764 | 764 | }, |
| 765 | - 71 => static function ($children) { |
|
| 765 | + 71 => static function($children) { |
|
| 766 | 766 | return Ast\Extension\Type\InputObjectTypeExtensionNode::create($children); |
| 767 | 767 | }, |
| 768 | - 74 => static function ($children) { |
|
| 768 | + 74 => static function($children) { |
|
| 769 | 769 | return Ast\Extension\Type\InterfaceTypeExtensionNode::create($children); |
| 770 | 770 | }, |
| 771 | - 77 => static function ($children) { |
|
| 771 | + 77 => static function($children) { |
|
| 772 | 772 | return Ast\Extension\Type\ObjectTypeExtensionNode::create($children); |
| 773 | 773 | }, |
| 774 | - 80 => static function ($children) { |
|
| 774 | + 80 => static function($children) { |
|
| 775 | 775 | return Ast\Extension\Type\ScalarTypeExtensionNode::create($children); |
| 776 | 776 | }, |
| 777 | - 83 => static function ($children) { |
|
| 777 | + 83 => static function($children) { |
|
| 778 | 778 | return Ast\Extension\Type\UnionTypeExtensionNode::create($children); |
| 779 | 779 | }, |
| 780 | - 86 => static function ($children) { |
|
| 780 | + 86 => static function($children) { |
|
| 781 | 781 | return Ast\Definition\SchemaDefinitionNode::create($children); |
| 782 | 782 | }, |
| 783 | - 93 => static function ($children) { |
|
| 783 | + 93 => static function($children) { |
|
| 784 | 784 | return Ast\Definition\OperationTypeDefinitionNode::create($children); |
| 785 | 785 | }, |
| 786 | - 107 => static function ($children) { |
|
| 786 | + 107 => static function($children) { |
|
| 787 | 787 | return Ast\Definition\DirectiveDefinitionNode::create($children); |
| 788 | 788 | }, |
| 789 | - 109 => static function ($children) { |
|
| 789 | + 109 => static function($children) { |
|
| 790 | 790 | return Ast\Definition\DirectiveDefinitionIsRepeatableNode::create(); |
| 791 | 791 | }, |
| 792 | - 118 => static function ($children) { |
|
| 792 | + 118 => static function($children) { |
|
| 793 | 793 | return Ast\Definition\DirectiveDefinitionLocationNode::create($children); |
| 794 | 794 | }, |
| 795 | - 114 => static function ($children) { |
|
| 795 | + 114 => static function($children) { |
|
| 796 | 796 | return Ast\Definition\ArgumentDefinitionNode::create($children); |
| 797 | 797 | }, |
| 798 | - 136 => static function ($children) { |
|
| 798 | + 136 => static function($children) { |
|
| 799 | 799 | return Ast\Definition\EnumValueDefinitionNode::create($children); |
| 800 | 800 | }, |
| 801 | - 137 => static function ($children) { |
|
| 801 | + 137 => static function($children) { |
|
| 802 | 802 | return Ast\Definition\FieldDefinitionNode::create($children); |
| 803 | 803 | }, |
| 804 | - 154 => static function ($children) { |
|
| 804 | + 154 => static function($children) { |
|
| 805 | 805 | return Ast\Definition\InputFieldDefinitionNode::create($children); |
| 806 | 806 | }, |
| 807 | - 157 => static function ($children) { |
|
| 807 | + 157 => static function($children) { |
|
| 808 | 808 | return Ast\Definition\Type\EnumTypeDefinitionNode::create($children); |
| 809 | 809 | }, |
| 810 | - 166 => static function ($children) { |
|
| 810 | + 166 => static function($children) { |
|
| 811 | 811 | return Ast\Definition\Type\InputObjectTypeDefinitionNode::create($children); |
| 812 | 812 | }, |
| 813 | - 176 => static function ($children) { |
|
| 813 | + 176 => static function($children) { |
|
| 814 | 814 | return Ast\Definition\Type\InterfaceTypeDefinitionNode::create($children); |
| 815 | 815 | }, |
| 816 | - 180 => static function ($children) { |
|
| 816 | + 180 => static function($children) { |
|
| 817 | 817 | return Ast\Definition\Type\ImplementedInterfaceNode::create($children); |
| 818 | 818 | }, |
| 819 | - 194 => static function ($children) { |
|
| 819 | + 194 => static function($children) { |
|
| 820 | 820 | return Ast\Definition\Type\ObjectTypeDefinitionNode::create($children); |
| 821 | 821 | }, |
| 822 | - 204 => static function ($children) { |
|
| 822 | + 204 => static function($children) { |
|
| 823 | 823 | return Ast\Definition\Type\ScalarTypeDefinitionNode::create($children); |
| 824 | 824 | }, |
| 825 | - 208 => static function ($children) { |
|
| 825 | + 208 => static function($children) { |
|
| 826 | 826 | return Ast\Definition\Type\UnionTypeDefinitionNode::create($children); |
| 827 | 827 | }, |
| 828 | - 214 => static function ($children) { |
|
| 828 | + 214 => static function($children) { |
|
| 829 | 829 | return Ast\Definition\Type\UnionMemberNode::create($children); |
| 830 | 830 | }, |
| 831 | - 90 => static function ($children) { |
|
| 831 | + 90 => static function($children) { |
|
| 832 | 832 | return Ast\Executable\DirectiveNode::create($children); |
| 833 | 833 | }, |
| 834 | - 226 => static function ($children) { |
|
| 834 | + 226 => static function($children) { |
|
| 835 | 835 | return Ast\Executable\ArgumentNode::create($children); |
| 836 | 836 | } |
| 837 | 837 | ], |