@@ -33,13 +33,13 @@ |
||
33 | 33 | $union->withOffset($rule->getOffset()); |
34 | 34 | $union->withDescription($rule->getDescription()); |
35 | 35 | |
36 | - $this->when->resolving(function () use ($rule, $union) { |
|
36 | + $this->when->resolving(function() use ($rule, $union) { |
|
37 | 37 | foreach ($rule->getUnitedTypes() as $ast) { |
38 | 38 | $union->withDefinition($ast->getTypeName()); |
39 | 39 | } |
40 | 40 | }); |
41 | 41 | |
42 | - $this->when->runtime(function () use ($rule, $union) { |
|
42 | + $this->when->runtime(function() use ($rule, $union) { |
|
43 | 43 | foreach ($rule->getDirectives() as $ast) { |
44 | 44 | $union->withDirective($this->dependent($ast, $union)); |
45 | 45 | } |
@@ -33,13 +33,13 @@ |
||
33 | 33 | $inputUnion->withOffset($rule->getOffset()); |
34 | 34 | $inputUnion->withDescription($rule->getDescription()); |
35 | 35 | |
36 | - $this->when->runtime(function () use ($rule, $inputUnion) { |
|
36 | + $this->when->runtime(function() use ($rule, $inputUnion) { |
|
37 | 37 | foreach ($rule->getDirectives() as $ast) { |
38 | 38 | $inputUnion->withDirective($this->dependent($ast, $inputUnion)); |
39 | 39 | } |
40 | 40 | }); |
41 | 41 | |
42 | - $this->when->resolving(function () use ($rule, $inputUnion) { |
|
42 | + $this->when->resolving(function() use ($rule, $inputUnion) { |
|
43 | 43 | foreach ($rule->getUnitedTypes() as $ast) { |
44 | 44 | $inputUnion->withDefinition($ast->getTypeName()); |
45 | 45 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $enum->withValue($this->dependent($enumValue, $enum)); |
37 | 37 | } |
38 | 38 | |
39 | - $this->when->runtime(function () use ($rule, $enum) { |
|
39 | + $this->when->runtime(function() use ($rule, $enum) { |
|
40 | 40 | foreach ($rule->getDirectives() as $ast) { |
41 | 41 | $enum->withDirective($this->dependent($ast, $enum)); |
42 | 42 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $schema->withOffset($rule->getOffset()); |
51 | 51 | $schema->withDescription($rule->getDescription()); |
52 | 52 | |
53 | - $this->when->runtime(function () use ($rule, $schema) { |
|
53 | + $this->when->runtime(function() use ($rule, $schema) { |
|
54 | 54 | foreach ($rule->getDirectives() as $ast) { |
55 | 55 | $schema->withDirective($this->dependent($ast, $schema)); |
56 | 56 | } |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | $this->validateModifiers($name, $hint, $schema); |
76 | 76 | $this->validateFieldName($name, $ast, $schema); |
77 | 77 | |
78 | - $this->when->resolving(function () use ($name, $schema, $hint) { |
|
78 | + $this->when->resolving(function() use ($name, $schema, $hint) { |
|
79 | 79 | $type = $this->load($hint->getTypeName(), $schema); |
80 | 80 | |
81 | - if (! ($type instanceof Definition\ObjectDefinition)) { |
|
81 | + if (!($type instanceof Definition\ObjectDefinition)) { |
|
82 | 82 | $error = 'Schema field %s<SchemaField> should return Object type, but %s given'; |
83 | 83 | throw (new TypeConflictException(\sprintf($error, $name, $type))) |
84 | 84 | ->throwsIn($schema->getFile(), $hint->getOffset()); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | private function validateFieldName(string $field, SchemaFieldDefinitionNode $rule, SchemaDefinition $schema): void |
126 | 126 | { |
127 | - if (! \in_array($field, [self::FIELD_QUERY, self::FIELD_MUTATION, self::FIELD_SUBSCRIPTION], true)) { |
|
127 | + if (!\in_array($field, [self::FIELD_QUERY, self::FIELD_MUTATION, self::FIELD_SUBSCRIPTION], true)) { |
|
128 | 128 | $error = \sprintf('Invalid %s schema field name "%s"', $schema, $field); |
129 | 129 | |
130 | 130 | throw (new TypeConflictException($error))->throwsIn($schema->getFile(), $rule->getOffset()); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $input->withOffset($rule->getOffset()); |
33 | 33 | $input->withDescription($rule->getDescription()); |
34 | 34 | |
35 | - $this->when->runtime(function () use ($rule, $input) { |
|
35 | + $this->when->runtime(function() use ($rule, $input) { |
|
36 | 36 | foreach ($rule->getDirectives() as $ast) { |
37 | 37 | $input->withDirective($this->dependent($ast, $input)); |
38 | 38 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | /** |
103 | 103 | * @validation <name: [Type] = Value> |
104 | 104 | */ |
105 | - if (! ($value instanceof ListValueNode)) { |
|
105 | + if (!($value instanceof ListValueNode)) { |
|
106 | 106 | $error = 'Value of %s should be a List, but %s given'; |
107 | 107 | throw (new TypeConflictException(\sprintf($error, $type, $value->toString())))->throwsIn($type->getFile(), |
108 | 108 | $value->getOffset()); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | /** |
163 | 163 | * @validation <name: InputType = Value> |
164 | 164 | */ |
165 | - if (! ($value instanceof InputValueNode)) { |
|
165 | + if (!($value instanceof InputValueNode)) { |
|
166 | 166 | $error = 'Value of %s should be a %s, but %s given'; |
167 | 167 | throw (new TypeConflictException(\sprintf($error, $type, $type->getDefinition(), |
168 | 168 | $value->toString())))->throwsIn($type->getFile(), $value->getOffset()); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | /** |
185 | 185 | * @validation <name: InputType = {nonExistentField: Value}> |
186 | 186 | */ |
187 | - if (! $definition->hasField($name)) { |
|
187 | + if (!$definition->hasField($name)) { |
|
188 | 188 | $error = 'Input field "%s" does not provided by %s, but %s given'; |
189 | 189 | throw (new TypeConflictException(\sprintf($error, $name, $type->getDefinition(), |
190 | 190 | $value->toString())))->throwsIn($type->getFile(), $value->getOffset()); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | /** |
208 | 208 | * @validation <name: Enum = "NotEnumValue"> |
209 | 209 | */ |
210 | - if (! ($value instanceof ConstantValueNode)) { |
|
210 | + if (!($value instanceof ConstantValueNode)) { |
|
211 | 211 | $error = 'Value of %s can be one of %s value, but %s given'; |
212 | 212 | throw (new TypeConflictException(\sprintf($error, $type, $type->getDefinition(), |
213 | 213 | $value->toString())))->throwsIn($type->getFile(), $value->getOffset()); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | /** |
222 | 222 | * @validation <name: Enum = NonExistentValue> |
223 | 223 | */ |
224 | - if (! $definition->hasValue($name)) { |
|
224 | + if (!$definition->hasValue($name)) { |
|
225 | 225 | $error = 'Enum %s does not provide value %s'; |
226 | 226 | throw (new TypeConflictException(\sprintf($error, $type->getDefinition(), $value->toString()))) |
227 | 227 | ->throwsIn($type->getFile(), $value->getOffset()); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | private function getFilter(): \Closure |
124 | 124 | { |
125 | - return function (TypeDefinition $resolved): bool { |
|
125 | + return function(TypeDefinition $resolved): bool { |
|
126 | 126 | return $this->shouldBreak($resolved); |
127 | 127 | }; |
128 | 128 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | private function shouldBreak(TypeDefinition $resolved): bool |
135 | 135 | { |
136 | - return ! isset($this->breakpoints[$resolved->getName()]); |
|
136 | + return !isset($this->breakpoints[$resolved->getName()]); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | yield $type; |
147 | 147 | |
148 | 148 | foreach ($type->getChildrenInheritance() as $child) { |
149 | - if (! $filter($child)) { |
|
149 | + if (!$filter($child)) { |
|
150 | 150 | continue; |
151 | 151 | } |
152 | 152 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $field->withDescription($rule->getDescription()); |
35 | 35 | $field->withModifiers($hint->getModifiers()); |
36 | 36 | |
37 | - $this->when->runtime(function () use ($rule, $field) { |
|
37 | + $this->when->runtime(function() use ($rule, $field) { |
|
38 | 38 | if ($default = $rule->getDefaultValue()) { |
39 | 39 | $field->withDefaultValue($this->valueOf($field, $default)); |
40 | 40 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $argument->withDescription($rule->getDescription()); |
35 | 35 | $argument->withModifiers($hint->getModifiers()); |
36 | 36 | |
37 | - $this->when->runtime(function () use ($rule, $argument) { |
|
37 | + $this->when->runtime(function() use ($rule, $argument) { |
|
38 | 38 | if ($default = $rule->getDefaultValue()) { |
39 | 39 | $argument->withDefaultValue($this->valueOf($argument, $default)); |
40 | 40 | } |