@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | { |
139 | 139 | $result = []; |
140 | 140 | |
141 | - if (! empty($this->errors)) { |
|
142 | - $errorsHandler = $this->errorsHandler ?: static function (array $errors, callable $formatter) { |
|
141 | + if (!empty($this->errors)) { |
|
142 | + $errorsHandler = $this->errorsHandler ?: static function(array $errors, callable $formatter) { |
|
143 | 143 | return array_map($formatter, $errors); |
144 | 144 | }; |
145 | 145 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $result['data'] = $this->data; |
154 | 154 | } |
155 | 155 | |
156 | - if (! empty($this->extensions)) { |
|
156 | + if (!empty($this->extensions)) { |
|
157 | 157 | $result['extensions'] = $this->extensions; |
158 | 158 | } |
159 | 159 |
@@ -88,7 +88,7 @@ |
||
88 | 88 | |
89 | 89 | // Some parameters could be provided as serialized JSON. |
90 | 90 | foreach (['extensions', 'variables'] as $param) { |
91 | - if (! is_string($params[$param])) { |
|
91 | + if (!is_string($params[$param])) { |
|
92 | 92 | continue; |
93 | 93 | } |
94 | 94 |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | if ($fieldType instanceof InputObjectType) { |
72 | 72 | $this->fieldPath[] = $field; |
73 | 73 | |
74 | - if (! isset($this->fieldPathIndexByTypeName[$fieldType->name])) { |
|
74 | + if (!isset($this->fieldPathIndexByTypeName[$fieldType->name])) { |
|
75 | 75 | $this->validate($fieldType); |
76 | 76 | } else { |
77 | 77 | $cycleIndex = $this->fieldPathIndexByTypeName[$fieldType->name]; |
78 | 78 | $cyclePath = array_slice($this->fieldPath, $cycleIndex); |
79 | 79 | $fieldNames = array_map( |
80 | - static function (InputObjectField $field) : string { |
|
80 | + static function(InputObjectField $field) : string { |
|
81 | 81 | return $field->name; |
82 | 82 | }, |
83 | 83 | $cyclePath |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'Cannot reference Input Object "' . $fieldType->name . '" within itself ' |
88 | 88 | . 'through a series of non-null fields: "' . implode('.', $fieldNames) . '".', |
89 | 89 | array_map( |
90 | - static function (InputObjectField $field) : ?InputValueDefinitionNode { |
|
90 | + static function(InputObjectField $field) : ?InputValueDefinitionNode { |
|
91 | 91 | return $field->astNode; |
92 | 92 | }, |
93 | 93 | $cyclePath |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function parseLiteral($valueNode, ?array $variables = null) |
57 | 57 | { |
58 | - if (! $valueNode instanceof BooleanValueNode) { |
|
58 | + if (!$valueNode instanceof BooleanValueNode) { |
|
59 | 59 | // Intentionally without message, as all information already in wrapped Exception |
60 | 60 | throw new Exception(); |
61 | 61 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | public function hasType(string $type) : bool |
74 | 74 | { |
75 | - return count(array_filter($this->getReferencedTypes(), static function (string $referencedType) use ($type) { |
|
75 | + return count(array_filter($this->getReferencedTypes(), static function(string $referencedType) use ($type) { |
|
76 | 76 | return $type === $referencedType; |
77 | 77 | })) > 0; |
78 | 78 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | public function hasField(string $field) : bool |
89 | 89 | { |
90 | - return count(array_filter($this->getReferencedFields(), static function (string $referencedField) use ($field) { |
|
90 | + return count(array_filter($this->getReferencedFields(), static function(string $referencedField) use ($field) { |
|
91 | 91 | return $field === $referencedField; |
92 | 92 | })) > 0; |
93 | 93 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function subFields(string $typename) : array |
99 | 99 | { |
100 | - if (! array_key_exists($typename, $this->types)) { |
|
100 | + if (!array_key_exists($typename, $this->types)) { |
|
101 | 101 | return []; |
102 | 102 | } |
103 | 103 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $queryPlan = []; |
113 | 113 | /** @var FieldNode $fieldNode */ |
114 | 114 | foreach ($fieldNodes as $fieldNode) { |
115 | - if (! $fieldNode->selectionSet) { |
|
115 | + if (!$fieldNode->selectionSet) { |
|
116 | 116 | continue; |
117 | 117 | } |
118 | 118 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | |
226 | 226 | foreach ($array2 as $key => & $value) { |
227 | 227 | if (is_numeric($key)) { |
228 | - if (! in_array($value, $merged, true)) { |
|
228 | + if (!in_array($value, $merged, true)) { |
|
229 | 229 | $merged[] = $value; |
230 | 230 | } |
231 | 231 | } elseif (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) { |
@@ -99,19 +99,19 @@ discard block |
||
99 | 99 | $ast, |
100 | 100 | [ |
101 | 101 | 'leave' => [ |
102 | - NodeKind::NAME => static function (NameNode $node) { |
|
102 | + NodeKind::NAME => static function(NameNode $node) { |
|
103 | 103 | return '' . $node->value; |
104 | 104 | }, |
105 | 105 | |
106 | - NodeKind::VARIABLE => static function (VariableNode $node) { |
|
106 | + NodeKind::VARIABLE => static function(VariableNode $node) { |
|
107 | 107 | return '$' . $node->name; |
108 | 108 | }, |
109 | 109 | |
110 | - NodeKind::DOCUMENT => function (DocumentNode $node) { |
|
110 | + NodeKind::DOCUMENT => function(DocumentNode $node) { |
|
111 | 111 | return $this->join($node->definitions, "\n\n") . "\n"; |
112 | 112 | }, |
113 | 113 | |
114 | - NodeKind::OPERATION_DEFINITION => function (OperationDefinitionNode $node) { |
|
114 | + NodeKind::OPERATION_DEFINITION => function(OperationDefinitionNode $node) { |
|
115 | 115 | $op = $node->operation; |
116 | 116 | $name = $node->name; |
117 | 117 | $varDefs = $this->wrap('(', $this->join($node->variableDefinitions, ', '), ')'); |
@@ -120,20 +120,20 @@ discard block |
||
120 | 120 | |
121 | 121 | // Anonymous queries with no directives or variable definitions can use |
122 | 122 | // the query short form. |
123 | - return ! $name && ! $directives && ! $varDefs && $op === 'query' |
|
123 | + return !$name && !$directives && !$varDefs && $op === 'query' |
|
124 | 124 | ? $selectionSet |
125 | 125 | : $this->join([$op, $this->join([$name, $varDefs]), $directives, $selectionSet], ' '); |
126 | 126 | }, |
127 | 127 | |
128 | - NodeKind::VARIABLE_DEFINITION => function (VariableDefinitionNode $node) { |
|
128 | + NodeKind::VARIABLE_DEFINITION => function(VariableDefinitionNode $node) { |
|
129 | 129 | return $node->variable . ': ' . $node->type . $this->wrap(' = ', $node->defaultValue); |
130 | 130 | }, |
131 | 131 | |
132 | - NodeKind::SELECTION_SET => function (SelectionSetNode $node) { |
|
132 | + NodeKind::SELECTION_SET => function(SelectionSetNode $node) { |
|
133 | 133 | return $this->block($node->selections); |
134 | 134 | }, |
135 | 135 | |
136 | - NodeKind::FIELD => function (FieldNode $node) { |
|
136 | + NodeKind::FIELD => function(FieldNode $node) { |
|
137 | 137 | return $this->join( |
138 | 138 | [ |
139 | 139 | $this->wrap('', $node->alias, ': ') . $node->name . $this->wrap( |
@@ -148,15 +148,15 @@ discard block |
||
148 | 148 | ); |
149 | 149 | }, |
150 | 150 | |
151 | - NodeKind::ARGUMENT => static function (ArgumentNode $node) { |
|
151 | + NodeKind::ARGUMENT => static function(ArgumentNode $node) { |
|
152 | 152 | return $node->name . ': ' . $node->value; |
153 | 153 | }, |
154 | 154 | |
155 | - NodeKind::FRAGMENT_SPREAD => function (FragmentSpreadNode $node) { |
|
155 | + NodeKind::FRAGMENT_SPREAD => function(FragmentSpreadNode $node) { |
|
156 | 156 | return '...' . $node->name . $this->wrap(' ', $this->join($node->directives, ' ')); |
157 | 157 | }, |
158 | 158 | |
159 | - NodeKind::INLINE_FRAGMENT => function (InlineFragmentNode $node) { |
|
159 | + NodeKind::INLINE_FRAGMENT => function(InlineFragmentNode $node) { |
|
160 | 160 | return $this->join( |
161 | 161 | [ |
162 | 162 | '...', |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | ); |
169 | 169 | }, |
170 | 170 | |
171 | - NodeKind::FRAGMENT_DEFINITION => function (FragmentDefinitionNode $node) { |
|
171 | + NodeKind::FRAGMENT_DEFINITION => function(FragmentDefinitionNode $node) { |
|
172 | 172 | // Note: fragment variable definitions are experimental and may be changed or removed in the future. |
173 | 173 | return sprintf('fragment %s', $node->name) |
174 | 174 | . $this->wrap('(', $this->join($node->variableDefinitions, ', '), ')') |
@@ -177,15 +177,15 @@ discard block |
||
177 | 177 | . $node->selectionSet; |
178 | 178 | }, |
179 | 179 | |
180 | - NodeKind::INT => static function (IntValueNode $node) { |
|
180 | + NodeKind::INT => static function(IntValueNode $node) { |
|
181 | 181 | return $node->value; |
182 | 182 | }, |
183 | 183 | |
184 | - NodeKind::FLOAT => static function (FloatValueNode $node) { |
|
184 | + NodeKind::FLOAT => static function(FloatValueNode $node) { |
|
185 | 185 | return $node->value; |
186 | 186 | }, |
187 | 187 | |
188 | - NodeKind::STRING => function (StringValueNode $node, $key) { |
|
188 | + NodeKind::STRING => function(StringValueNode $node, $key) { |
|
189 | 189 | if ($node->block) { |
190 | 190 | return $this->printBlockString($node->value, $key === 'description'); |
191 | 191 | } |
@@ -193,47 +193,47 @@ discard block |
||
193 | 193 | return json_encode($node->value); |
194 | 194 | }, |
195 | 195 | |
196 | - NodeKind::BOOLEAN => static function (BooleanValueNode $node) { |
|
196 | + NodeKind::BOOLEAN => static function(BooleanValueNode $node) { |
|
197 | 197 | return $node->value ? 'true' : 'false'; |
198 | 198 | }, |
199 | 199 | |
200 | - NodeKind::NULL => static function (NullValueNode $node) { |
|
200 | + NodeKind::NULL => static function(NullValueNode $node) { |
|
201 | 201 | return 'null'; |
202 | 202 | }, |
203 | 203 | |
204 | - NodeKind::ENUM => static function (EnumValueNode $node) { |
|
204 | + NodeKind::ENUM => static function(EnumValueNode $node) { |
|
205 | 205 | return $node->value; |
206 | 206 | }, |
207 | 207 | |
208 | - NodeKind::LST => function (ListValueNode $node) { |
|
208 | + NodeKind::LST => function(ListValueNode $node) { |
|
209 | 209 | return '[' . $this->join($node->values, ', ') . ']'; |
210 | 210 | }, |
211 | 211 | |
212 | - NodeKind::OBJECT => function (ObjectValueNode $node) { |
|
212 | + NodeKind::OBJECT => function(ObjectValueNode $node) { |
|
213 | 213 | return '{' . $this->join($node->fields, ', ') . '}'; |
214 | 214 | }, |
215 | 215 | |
216 | - NodeKind::OBJECT_FIELD => static function (ObjectFieldNode $node) { |
|
216 | + NodeKind::OBJECT_FIELD => static function(ObjectFieldNode $node) { |
|
217 | 217 | return $node->name . ': ' . $node->value; |
218 | 218 | }, |
219 | 219 | |
220 | - NodeKind::DIRECTIVE => function (DirectiveNode $node) { |
|
220 | + NodeKind::DIRECTIVE => function(DirectiveNode $node) { |
|
221 | 221 | return '@' . $node->name . $this->wrap('(', $this->join($node->arguments, ', '), ')'); |
222 | 222 | }, |
223 | 223 | |
224 | - NodeKind::NAMED_TYPE => static function (NamedTypeNode $node) { |
|
224 | + NodeKind::NAMED_TYPE => static function(NamedTypeNode $node) { |
|
225 | 225 | return $node->name; |
226 | 226 | }, |
227 | 227 | |
228 | - NodeKind::LIST_TYPE => static function (ListTypeNode $node) { |
|
228 | + NodeKind::LIST_TYPE => static function(ListTypeNode $node) { |
|
229 | 229 | return '[' . $node->type . ']'; |
230 | 230 | }, |
231 | 231 | |
232 | - NodeKind::NON_NULL_TYPE => static function (NonNullTypeNode $node) { |
|
232 | + NodeKind::NON_NULL_TYPE => static function(NonNullTypeNode $node) { |
|
233 | 233 | return $node->type . '!'; |
234 | 234 | }, |
235 | 235 | |
236 | - NodeKind::SCHEMA_DEFINITION => function (SchemaDefinitionNode $def) { |
|
236 | + NodeKind::SCHEMA_DEFINITION => function(SchemaDefinitionNode $def) { |
|
237 | 237 | return $this->join( |
238 | 238 | [ |
239 | 239 | 'schema', |
@@ -244,15 +244,15 @@ discard block |
||
244 | 244 | ); |
245 | 245 | }, |
246 | 246 | |
247 | - NodeKind::OPERATION_TYPE_DEFINITION => static function (OperationTypeDefinitionNode $def) { |
|
247 | + NodeKind::OPERATION_TYPE_DEFINITION => static function(OperationTypeDefinitionNode $def) { |
|
248 | 248 | return $def->operation . ': ' . $def->type; |
249 | 249 | }, |
250 | 250 | |
251 | - NodeKind::SCALAR_TYPE_DEFINITION => $this->addDescription(function (ScalarTypeDefinitionNode $def) { |
|
251 | + NodeKind::SCALAR_TYPE_DEFINITION => $this->addDescription(function(ScalarTypeDefinitionNode $def) { |
|
252 | 252 | return $this->join(['scalar', $def->name, $this->join($def->directives, ' ')], ' '); |
253 | 253 | }), |
254 | 254 | |
255 | - NodeKind::OBJECT_TYPE_DEFINITION => $this->addDescription(function (ObjectTypeDefinitionNode $def) { |
|
255 | + NodeKind::OBJECT_TYPE_DEFINITION => $this->addDescription(function(ObjectTypeDefinitionNode $def) { |
|
256 | 256 | return $this->join( |
257 | 257 | [ |
258 | 258 | 'type', |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | ); |
266 | 266 | }), |
267 | 267 | |
268 | - NodeKind::FIELD_DEFINITION => $this->addDescription(function (FieldDefinitionNode $def) { |
|
269 | - $noIndent = Utils::every($def->arguments, static function (string $arg) { |
|
268 | + NodeKind::FIELD_DEFINITION => $this->addDescription(function(FieldDefinitionNode $def) { |
|
269 | + $noIndent = Utils::every($def->arguments, static function(string $arg) { |
|
270 | 270 | return strpos($arg, "\n") === false; |
271 | 271 | }); |
272 | 272 | |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | . $this->wrap(' ', $this->join($def->directives, ' ')); |
279 | 279 | }), |
280 | 280 | |
281 | - NodeKind::INPUT_VALUE_DEFINITION => $this->addDescription(function (InputValueDefinitionNode $def) { |
|
281 | + NodeKind::INPUT_VALUE_DEFINITION => $this->addDescription(function(InputValueDefinitionNode $def) { |
|
282 | 282 | return $this->join( |
283 | 283 | [ |
284 | 284 | $def->name . ': ' . $def->type, |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | }), |
291 | 291 | |
292 | 292 | NodeKind::INTERFACE_TYPE_DEFINITION => $this->addDescription( |
293 | - function (InterfaceTypeDefinitionNode $def) { |
|
293 | + function(InterfaceTypeDefinitionNode $def) { |
|
294 | 294 | return $this->join( |
295 | 295 | [ |
296 | 296 | 'interface', |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | } |
304 | 304 | ), |
305 | 305 | |
306 | - NodeKind::UNION_TYPE_DEFINITION => $this->addDescription(function (UnionTypeDefinitionNode $def) { |
|
306 | + NodeKind::UNION_TYPE_DEFINITION => $this->addDescription(function(UnionTypeDefinitionNode $def) { |
|
307 | 307 | return $this->join( |
308 | 308 | [ |
309 | 309 | 'union', |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | ); |
318 | 318 | }), |
319 | 319 | |
320 | - NodeKind::ENUM_TYPE_DEFINITION => $this->addDescription(function (EnumTypeDefinitionNode $def) { |
|
320 | + NodeKind::ENUM_TYPE_DEFINITION => $this->addDescription(function(EnumTypeDefinitionNode $def) { |
|
321 | 321 | return $this->join( |
322 | 322 | [ |
323 | 323 | 'enum', |
@@ -329,11 +329,11 @@ discard block |
||
329 | 329 | ); |
330 | 330 | }), |
331 | 331 | |
332 | - NodeKind::ENUM_VALUE_DEFINITION => $this->addDescription(function (EnumValueDefinitionNode $def) { |
|
332 | + NodeKind::ENUM_VALUE_DEFINITION => $this->addDescription(function(EnumValueDefinitionNode $def) { |
|
333 | 333 | return $this->join([$def->name, $this->join($def->directives, ' ')], ' '); |
334 | 334 | }), |
335 | 335 | |
336 | - NodeKind::INPUT_OBJECT_TYPE_DEFINITION => $this->addDescription(function ( |
|
336 | + NodeKind::INPUT_OBJECT_TYPE_DEFINITION => $this->addDescription(function( |
|
337 | 337 | InputObjectTypeDefinitionNode $def |
338 | 338 | ) { |
339 | 339 | return $this->join( |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | ); |
348 | 348 | }), |
349 | 349 | |
350 | - NodeKind::SCHEMA_EXTENSION => function (SchemaTypeExtensionNode $def) { |
|
350 | + NodeKind::SCHEMA_EXTENSION => function(SchemaTypeExtensionNode $def) { |
|
351 | 351 | return $this->join( |
352 | 352 | [ |
353 | 353 | 'extend schema', |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | ); |
359 | 359 | }, |
360 | 360 | |
361 | - NodeKind::SCALAR_TYPE_EXTENSION => function (ScalarTypeExtensionNode $def) { |
|
361 | + NodeKind::SCALAR_TYPE_EXTENSION => function(ScalarTypeExtensionNode $def) { |
|
362 | 362 | return $this->join( |
363 | 363 | [ |
364 | 364 | 'extend scalar', |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | ); |
370 | 370 | }, |
371 | 371 | |
372 | - NodeKind::OBJECT_TYPE_EXTENSION => function (ObjectTypeExtensionNode $def) { |
|
372 | + NodeKind::OBJECT_TYPE_EXTENSION => function(ObjectTypeExtensionNode $def) { |
|
373 | 373 | return $this->join( |
374 | 374 | [ |
375 | 375 | 'extend type', |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | ); |
383 | 383 | }, |
384 | 384 | |
385 | - NodeKind::INTERFACE_TYPE_EXTENSION => function (InterfaceTypeExtensionNode $def) { |
|
385 | + NodeKind::INTERFACE_TYPE_EXTENSION => function(InterfaceTypeExtensionNode $def) { |
|
386 | 386 | return $this->join( |
387 | 387 | [ |
388 | 388 | 'extend interface', |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | ); |
395 | 395 | }, |
396 | 396 | |
397 | - NodeKind::UNION_TYPE_EXTENSION => function (UnionTypeExtensionNode $def) { |
|
397 | + NodeKind::UNION_TYPE_EXTENSION => function(UnionTypeExtensionNode $def) { |
|
398 | 398 | return $this->join( |
399 | 399 | [ |
400 | 400 | 'extend union', |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | ); |
409 | 409 | }, |
410 | 410 | |
411 | - NodeKind::ENUM_TYPE_EXTENSION => function (EnumTypeExtensionNode $def) { |
|
411 | + NodeKind::ENUM_TYPE_EXTENSION => function(EnumTypeExtensionNode $def) { |
|
412 | 412 | return $this->join( |
413 | 413 | [ |
414 | 414 | 'extend enum', |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | ); |
421 | 421 | }, |
422 | 422 | |
423 | - NodeKind::INPUT_OBJECT_TYPE_EXTENSION => function (InputObjectTypeExtensionNode $def) { |
|
423 | + NodeKind::INPUT_OBJECT_TYPE_EXTENSION => function(InputObjectTypeExtensionNode $def) { |
|
424 | 424 | return $this->join( |
425 | 425 | [ |
426 | 426 | 'extend input', |
@@ -432,8 +432,8 @@ discard block |
||
432 | 432 | ); |
433 | 433 | }, |
434 | 434 | |
435 | - NodeKind::DIRECTIVE_DEFINITION => $this->addDescription(function (DirectiveDefinitionNode $def) { |
|
436 | - $noIndent = Utils::every($def->arguments, static function (string $arg) { |
|
435 | + NodeKind::DIRECTIVE_DEFINITION => $this->addDescription(function(DirectiveDefinitionNode $def) { |
|
436 | + $noIndent = Utils::every($def->arguments, static function(string $arg) { |
|
437 | 437 | return strpos($arg, "\n") === false; |
438 | 438 | }); |
439 | 439 | |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | |
452 | 452 | public function addDescription(callable $cb) |
453 | 453 | { |
454 | - return function ($node) use ($cb) { |
|
454 | + return function($node) use ($cb) { |
|
455 | 455 | return $this->join([$node->description, $cb($node)], "\n"); |
456 | 456 | }; |
457 | 457 | } |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | $separator, |
499 | 499 | Utils::filter( |
500 | 500 | $maybeArray, |
501 | - static function ($x) { |
|
501 | + static function($x) { |
|
502 | 502 | return (bool) $x; |
503 | 503 | } |
504 | 504 | ) |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | $breakingChanges = []; |
122 | 122 | foreach ($schemaATypeMap as $typeName => $schemaAType) { |
123 | - if (! isset($schemaBTypeMap[$typeName])) { |
|
123 | + if (!isset($schemaBTypeMap[$typeName])) { |
|
124 | 124 | continue; |
125 | 125 | } |
126 | 126 | $schemaBType = $schemaBTypeMap[$typeName]; |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | $breakingChanges = []; |
191 | 191 | foreach ($oldTypeMap as $typeName => $oldType) { |
192 | 192 | $newType = $newTypeMap[$typeName] ?? null; |
193 | - if (! ($oldType instanceof ObjectType || $oldType instanceof InterfaceType) || |
|
194 | - ! ($newType instanceof ObjectType || $newType instanceof InterfaceType) || |
|
195 | - ! ($newType instanceof $oldType) |
|
193 | + if (!($oldType instanceof ObjectType || $oldType instanceof InterfaceType) || |
|
194 | + !($newType instanceof ObjectType || $newType instanceof InterfaceType) || |
|
195 | + !($newType instanceof $oldType) |
|
196 | 196 | ) { |
197 | 197 | continue; |
198 | 198 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $newTypeFieldsDef = $newType->getFields(); |
202 | 202 | foreach ($oldTypeFieldsDef as $fieldName => $fieldDefinition) { |
203 | 203 | // Check if the field is missing on the type in the new schema. |
204 | - if (! isset($newTypeFieldsDef[$fieldName])) { |
|
204 | + if (!isset($newTypeFieldsDef[$fieldName])) { |
|
205 | 205 | $breakingChanges[] = [ |
206 | 206 | 'type' => self::BREAKING_CHANGE_FIELD_REMOVED, |
207 | 207 | 'description' => "${typeName}.${fieldName} was removed.", |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $oldFieldType, |
214 | 214 | $newFieldType |
215 | 215 | ); |
216 | - if (! $isSafe) { |
|
216 | + if (!$isSafe) { |
|
217 | 217 | $oldFieldTypeString = $oldFieldType instanceof NamedType |
218 | 218 | ? $oldFieldType->name |
219 | 219 | : $oldFieldType; |
@@ -283,14 +283,14 @@ discard block |
||
283 | 283 | $dangerousChanges = []; |
284 | 284 | foreach ($oldTypeMap as $typeName => $oldType) { |
285 | 285 | $newType = $newTypeMap[$typeName] ?? null; |
286 | - if (! ($oldType instanceof InputObjectType) || ! ($newType instanceof InputObjectType)) { |
|
286 | + if (!($oldType instanceof InputObjectType) || !($newType instanceof InputObjectType)) { |
|
287 | 287 | continue; |
288 | 288 | } |
289 | 289 | |
290 | 290 | $oldTypeFieldsDef = $oldType->getFields(); |
291 | 291 | $newTypeFieldsDef = $newType->getFields(); |
292 | 292 | foreach (array_keys($oldTypeFieldsDef) as $fieldName) { |
293 | - if (! isset($newTypeFieldsDef[$fieldName])) { |
|
293 | + if (!isset($newTypeFieldsDef[$fieldName])) { |
|
294 | 294 | $breakingChanges[] = [ |
295 | 295 | 'type' => self::BREAKING_CHANGE_FIELD_REMOVED, |
296 | 296 | 'description' => "${typeName}.${fieldName} was removed.", |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | $oldFieldType, |
304 | 304 | $newFieldType |
305 | 305 | ); |
306 | - if (! $isSafe) { |
|
306 | + if (!$isSafe) { |
|
307 | 307 | $oldFieldTypeString = $oldFieldType instanceof NamedType |
308 | 308 | ? $oldFieldType->name |
309 | 309 | : $oldFieldType; |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | $newType->getWrappedType() |
375 | 375 | )) || |
376 | 376 | // moving from non-null to nullable of the same underlying type is safe |
377 | - ! ($newType instanceof NonNull) && |
|
377 | + !($newType instanceof NonNull) && |
|
378 | 378 | self::isChangeSafeForInputObjectFieldOrFieldArg($oldType->getWrappedType(), $newType); |
379 | 379 | } |
380 | 380 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $typesRemovedFromUnion = []; |
398 | 398 | foreach ($oldTypeMap as $typeName => $oldType) { |
399 | 399 | $newType = $newTypeMap[$typeName] ?? null; |
400 | - if (! ($oldType instanceof UnionType) || ! ($newType instanceof UnionType)) { |
|
400 | + if (!($oldType instanceof UnionType) || !($newType instanceof UnionType)) { |
|
401 | 401 | continue; |
402 | 402 | } |
403 | 403 | $typeNamesInNewUnion = []; |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | $valuesRemovedFromEnums = []; |
436 | 436 | foreach ($oldTypeMap as $typeName => $oldType) { |
437 | 437 | $newType = $newTypeMap[$typeName] ?? null; |
438 | - if (! ($oldType instanceof EnumType) || ! ($newType instanceof EnumType)) { |
|
438 | + if (!($oldType instanceof EnumType) || !($newType instanceof EnumType)) { |
|
439 | 439 | continue; |
440 | 440 | } |
441 | 441 | $valuesInNewEnum = []; |
@@ -477,9 +477,9 @@ discard block |
||
477 | 477 | |
478 | 478 | foreach ($oldTypeMap as $typeName => $oldType) { |
479 | 479 | $newType = $newTypeMap[$typeName] ?? null; |
480 | - if (! ($oldType instanceof ObjectType || $oldType instanceof InterfaceType) || |
|
481 | - ! ($newType instanceof ObjectType || $newType instanceof InterfaceType) || |
|
482 | - ! ($newType instanceof $oldType) |
|
480 | + if (!($oldType instanceof ObjectType || $oldType instanceof InterfaceType) || |
|
481 | + !($newType instanceof ObjectType || $newType instanceof InterfaceType) || |
|
482 | + !($newType instanceof $oldType) |
|
483 | 483 | ) { |
484 | 484 | continue; |
485 | 485 | } |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | $newTypeFields = $newType->getFields(); |
489 | 489 | |
490 | 490 | foreach ($oldTypeFields as $fieldName => $oldField) { |
491 | - if (! isset($newTypeFields[$fieldName])) { |
|
491 | + if (!isset($newTypeFields[$fieldName])) { |
|
492 | 492 | continue; |
493 | 493 | } |
494 | 494 | |
@@ -496,18 +496,18 @@ discard block |
||
496 | 496 | $newArgs = $newTypeFields[$fieldName]->args; |
497 | 497 | $newArgDef = Utils::find( |
498 | 498 | $newArgs, |
499 | - static function ($arg) use ($oldArgDef) { |
|
499 | + static function($arg) use ($oldArgDef) { |
|
500 | 500 | return $arg->name === $oldArgDef->name; |
501 | 501 | } |
502 | 502 | ); |
503 | 503 | if ($newArgDef !== null) { |
504 | - $isSafe = self::isChangeSafeForInputObjectFieldOrFieldArg( |
|
504 | + $isSafe = self::isChangeSafeForInputObjectFieldOrFieldArg( |
|
505 | 505 | $oldArgDef->getType(), |
506 | 506 | $newArgDef->getType() |
507 | 507 | ); |
508 | 508 | $oldArgType = $oldArgDef->getType(); |
509 | 509 | $oldArgName = $oldArgDef->name; |
510 | - if (! $isSafe) { |
|
510 | + if (!$isSafe) { |
|
511 | 511 | $newArgType = $newArgDef->getType(); |
512 | 512 | $breakingChanges[] = [ |
513 | 513 | 'type' => self::BREAKING_CHANGE_ARG_CHANGED_KIND, |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | $oldArgs = $oldTypeFields[$fieldName]->args; |
536 | 536 | $oldArgDef = Utils::find( |
537 | 537 | $oldArgs, |
538 | - static function ($arg) use ($newTypeFieldArgDef) { |
|
538 | + static function($arg) use ($newTypeFieldArgDef) { |
|
539 | 539 | return $arg->name === $newTypeFieldArgDef->name; |
540 | 540 | } |
541 | 541 | ); |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | |
582 | 582 | foreach ($oldTypeMap as $typeName => $oldType) { |
583 | 583 | $newType = $newTypeMap[$typeName] ?? null; |
584 | - if (! ($oldType instanceof ObjectType) || ! ($newType instanceof ObjectType)) { |
|
584 | + if (!($oldType instanceof ObjectType) || !($newType instanceof ObjectType)) { |
|
585 | 585 | continue; |
586 | 586 | } |
587 | 587 | |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | foreach ($oldInterfaces as $oldInterface) { |
591 | 591 | $interface = Utils::find( |
592 | 592 | $newInterfaces, |
593 | - static function (InterfaceType $interface) use ($oldInterface) : bool { |
|
593 | + static function(InterfaceType $interface) use ($oldInterface) : bool { |
|
594 | 594 | return $interface->name === $oldInterface->name; |
595 | 595 | } |
596 | 596 | ); |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | { |
635 | 635 | return Utils::keyMap( |
636 | 636 | $schema->getDirectives(), |
637 | - static function ($dir) { |
|
637 | + static function($dir) { |
|
638 | 638 | return $dir->name; |
639 | 639 | } |
640 | 640 | ); |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | $oldSchemaDirectiveMap = self::getDirectiveMapForSchema($oldSchema); |
647 | 647 | |
648 | 648 | foreach ($newSchema->getDirectives() as $newDirective) { |
649 | - if (! isset($oldSchemaDirectiveMap[$newDirective->name])) { |
|
649 | + if (!isset($oldSchemaDirectiveMap[$newDirective->name])) { |
|
650 | 650 | continue; |
651 | 651 | } |
652 | 652 | |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | { |
684 | 684 | return Utils::keyMap( |
685 | 685 | $directive->args ?: [], |
686 | - static function ($arg) { |
|
686 | + static function($arg) { |
|
687 | 687 | return $arg->name; |
688 | 688 | } |
689 | 689 | ); |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | $oldSchemaDirectiveMap = self::getDirectiveMapForSchema($oldSchema); |
696 | 696 | |
697 | 697 | foreach ($newSchema->getDirectives() as $newDirective) { |
698 | - if (! isset($oldSchemaDirectiveMap[$newDirective->name])) { |
|
698 | + if (!isset($oldSchemaDirectiveMap[$newDirective->name])) { |
|
699 | 699 | continue; |
700 | 700 | } |
701 | 701 | |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | $oldSchemaDirectiveMap[$newDirective->name], |
704 | 704 | $newDirective |
705 | 705 | ) as $arg) { |
706 | - if (! $arg->getType() instanceof NonNull) { |
|
706 | + if (!$arg->getType() instanceof NonNull) { |
|
707 | 707 | continue; |
708 | 708 | } |
709 | 709 | $addedNonNullableArgs[] = [ |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | $oldSchemaDirectiveMap = self::getDirectiveMapForSchema($oldSchema); |
748 | 748 | |
749 | 749 | foreach ($newSchema->getDirectives() as $newDirective) { |
750 | - if (! isset($oldSchemaDirectiveMap[$newDirective->name])) { |
|
750 | + if (!isset($oldSchemaDirectiveMap[$newDirective->name])) { |
|
751 | 751 | continue; |
752 | 752 | } |
753 | 753 | |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | $valuesAddedToEnums = []; |
814 | 814 | foreach ($oldTypeMap as $typeName => $oldType) { |
815 | 815 | $newType = $newTypeMap[$typeName] ?? null; |
816 | - if (! ($oldType instanceof EnumType) || ! ($newType instanceof EnumType)) { |
|
816 | + if (!($oldType instanceof EnumType) || !($newType instanceof EnumType)) { |
|
817 | 817 | continue; |
818 | 818 | } |
819 | 819 | $valuesInOldEnum = []; |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | |
849 | 849 | foreach ($newTypeMap as $typeName => $newType) { |
850 | 850 | $oldType = $oldTypeMap[$typeName] ?? null; |
851 | - if (! ($oldType instanceof ObjectType) || ! ($newType instanceof ObjectType)) { |
|
851 | + if (!($oldType instanceof ObjectType) || !($newType instanceof ObjectType)) { |
|
852 | 852 | continue; |
853 | 853 | } |
854 | 854 | |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | foreach ($newInterfaces as $newInterface) { |
858 | 858 | $interface = Utils::find( |
859 | 859 | $oldInterfaces, |
860 | - static function (InterfaceType $interface) use ($newInterface) : bool { |
|
860 | + static function(InterfaceType $interface) use ($newInterface) : bool { |
|
861 | 861 | return $interface->name === $newInterface->name; |
862 | 862 | } |
863 | 863 | ); |
@@ -896,7 +896,7 @@ discard block |
||
896 | 896 | $typesAddedToUnion = []; |
897 | 897 | foreach ($newTypeMap as $typeName => $newType) { |
898 | 898 | $oldType = $oldTypeMap[$typeName] ?? null; |
899 | - if (! ($oldType instanceof UnionType) || ! ($newType instanceof UnionType)) { |
|
899 | + if (!($oldType instanceof UnionType) || !($newType instanceof UnionType)) { |
|
900 | 900 | continue; |
901 | 901 | } |
902 | 902 |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $this->parentTypeStack = []; |
82 | 82 | $this->inputTypeStack = []; |
83 | 83 | $this->fieldDefStack = []; |
84 | - if (! $initialType) { |
|
84 | + if (!$initialType) { |
|
85 | 85 | return; |
86 | 86 | } |
87 | 87 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | if (Type::isCompositeType($initialType)) { |
92 | 92 | $this->parentTypeStack[] = $initialType; |
93 | 93 | } |
94 | - if (! Type::isOutputType($initialType)) { |
|
94 | + if (!Type::isOutputType($initialType)) { |
|
95 | 95 | return; |
96 | 96 | } |
97 | 97 | |
@@ -140,17 +140,17 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public static function extractTypes($type, ?array $typeMap = null) |
142 | 142 | { |
143 | - if (! $typeMap) { |
|
143 | + if (!$typeMap) { |
|
144 | 144 | $typeMap = []; |
145 | 145 | } |
146 | - if (! $type) { |
|
146 | + if (!$type) { |
|
147 | 147 | return $typeMap; |
148 | 148 | } |
149 | 149 | |
150 | 150 | if ($type instanceof WrappingType) { |
151 | 151 | return self::extractTypes($type->getWrappedType(true), $typeMap); |
152 | 152 | } |
153 | - if (! $type instanceof Type) { |
|
153 | + if (!$type instanceof Type) { |
|
154 | 154 | // Preserve these invalid types in map (at numeric index) to make them |
155 | 155 | // detectable during $schema->validate() |
156 | 156 | $i = 0; |
@@ -159,14 +159,14 @@ discard block |
||
159 | 159 | $alreadyInMap = $alreadyInMap || $typeMap[$i] === $type; |
160 | 160 | $i++; |
161 | 161 | } |
162 | - if (! $alreadyInMap) { |
|
162 | + if (!$alreadyInMap) { |
|
163 | 163 | $typeMap[$i] = $type; |
164 | 164 | } |
165 | 165 | |
166 | 166 | return $typeMap; |
167 | 167 | } |
168 | 168 | |
169 | - if (! empty($typeMap[$type->name])) { |
|
169 | + if (!empty($typeMap[$type->name])) { |
|
170 | 170 | Utils::invariant( |
171 | 171 | $typeMap[$type->name] === $type, |
172 | 172 | sprintf('Schema must contain unique named types but contains multiple types named "%s" ', $type) . |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | } |
188 | 188 | if ($type instanceof ObjectType || $type instanceof InterfaceType) { |
189 | 189 | foreach ($type->getFields() as $fieldName => $field) { |
190 | - if (! empty($field->args)) { |
|
190 | + if (!empty($field->args)) { |
|
191 | 191 | $fieldArgTypes = array_map( |
192 | - static function (FieldArgument $arg) { |
|
192 | + static function(FieldArgument $arg) { |
|
193 | 193 | return $arg->getType(); |
194 | 194 | }, |
195 | 195 | $field->args |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | if ($fieldOrDirective) { |
321 | 321 | $argDef = Utils::find( |
322 | 322 | $fieldOrDirective->args, |
323 | - static function ($arg) use ($node) { |
|
323 | + static function($arg) use ($node) { |
|
324 | 324 | return $arg->name === $node->name->value; |
325 | 325 | } |
326 | 326 | ); |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | */ |
369 | 369 | public function getType() |
370 | 370 | { |
371 | - if (! empty($this->typeStack)) { |
|
371 | + if (!empty($this->typeStack)) { |
|
372 | 372 | return $this->typeStack[count($this->typeStack) - 1]; |
373 | 373 | } |
374 | 374 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | */ |
381 | 381 | public function getParentType() |
382 | 382 | { |
383 | - if (! empty($this->parentTypeStack)) { |
|
383 | + if (!empty($this->parentTypeStack)) { |
|
384 | 384 | return $this->parentTypeStack[count($this->parentTypeStack) - 1]; |
385 | 385 | } |
386 | 386 | |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | */ |
446 | 446 | public function getFieldDef() |
447 | 447 | { |
448 | - if (! empty($this->fieldDefStack)) { |
|
448 | + if (!empty($this->fieldDefStack)) { |
|
449 | 449 | return $this->fieldDefStack[count($this->fieldDefStack) - 1]; |
450 | 450 | } |
451 | 451 | |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | */ |
458 | 458 | public function getInputType() |
459 | 459 | { |
460 | - if (! empty($this->inputTypeStack)) { |
|
460 | + if (!empty($this->inputTypeStack)) { |
|
461 | 461 | return $this->inputTypeStack[count($this->inputTypeStack) - 1]; |
462 | 462 | } |
463 | 463 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | 'description' => $this->getDescription($directiveNode), |
84 | 84 | 'locations' => Utils::map( |
85 | 85 | $directiveNode->locations, |
86 | - static function ($node) { |
|
86 | + static function($node) { |
|
87 | 87 | return $node->value; |
88 | 88 | } |
89 | 89 | ), |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | private function getLeadingCommentBlock($node) |
114 | 114 | { |
115 | 115 | $loc = $node->loc; |
116 | - if (! $loc || ! $loc->startToken) { |
|
116 | + if (!$loc || !$loc->startToken) { |
|
117 | 117 | return null; |
118 | 118 | } |
119 | 119 | $comments = []; |
@@ -136,10 +136,10 @@ discard block |
||
136 | 136 | { |
137 | 137 | return Utils::keyValMap( |
138 | 138 | $values, |
139 | - static function ($value) { |
|
139 | + static function($value) { |
|
140 | 140 | return $value->name->value; |
141 | 141 | }, |
142 | - function ($value) { |
|
142 | + function($value) { |
|
143 | 143 | // Note: While this could make assertions to get the correctly typed |
144 | 144 | // value, that would throw immediately while type system validation |
145 | 145 | // with validateSchema() will produce more actionable results. |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | */ |
199 | 199 | private function internalBuildType($typeName, $typeNode = null) |
200 | 200 | { |
201 | - if (! isset($this->cache[$typeName])) { |
|
201 | + if (!isset($this->cache[$typeName])) { |
|
202 | 202 | if (isset($this->typeDefinitionsMap[$typeName])) { |
203 | 203 | $type = $this->makeSchemaDef($this->typeDefinitionsMap[$typeName]); |
204 | 204 | if ($this->typeConfigDecorator) { |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $e |
217 | 217 | ); |
218 | 218 | } |
219 | - if (! is_array($config) || isset($config[0])) { |
|
219 | + if (!is_array($config) || isset($config[0])) { |
|
220 | 220 | throw new Error( |
221 | 221 | sprintf( |
222 | 222 | 'Type config decorator passed to %s is expected to return an array, but got %s', |
@@ -271,10 +271,10 @@ discard block |
||
271 | 271 | return new ObjectType([ |
272 | 272 | 'name' => $typeName, |
273 | 273 | 'description' => $this->getDescription($def), |
274 | - 'fields' => function () use ($def) { |
|
274 | + 'fields' => function() use ($def) { |
|
275 | 275 | return $this->makeFieldDefMap($def); |
276 | 276 | }, |
277 | - 'interfaces' => function () use ($def) { |
|
277 | + 'interfaces' => function() use ($def) { |
|
278 | 278 | return $this->makeImplementedInterfaces($def); |
279 | 279 | }, |
280 | 280 | 'astNode' => $def, |
@@ -286,10 +286,10 @@ discard block |
||
286 | 286 | return $def->fields |
287 | 287 | ? Utils::keyValMap( |
288 | 288 | $def->fields, |
289 | - static function ($field) { |
|
289 | + static function($field) { |
|
290 | 290 | return $field->name->value; |
291 | 291 | }, |
292 | - function ($field) { |
|
292 | + function($field) { |
|
293 | 293 | return $this->buildField($field); |
294 | 294 | } |
295 | 295 | ) |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | // validation with validateSchema() will produce more actionable results. |
334 | 334 | return Utils::map( |
335 | 335 | $def->interfaces, |
336 | - function ($iface) { |
|
336 | + function($iface) { |
|
337 | 337 | return $this->buildType($iface); |
338 | 338 | } |
339 | 339 | ); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | return new InterfaceType([ |
350 | 350 | 'name' => $typeName, |
351 | 351 | 'description' => $this->getDescription($def), |
352 | - 'fields' => function () use ($def) { |
|
352 | + 'fields' => function() use ($def) { |
|
353 | 353 | return $this->makeFieldDefMap($def); |
354 | 354 | }, |
355 | 355 | 'astNode' => $def, |
@@ -364,10 +364,10 @@ discard block |
||
364 | 364 | 'values' => $def->values |
365 | 365 | ? Utils::keyValMap( |
366 | 366 | $def->values, |
367 | - static function ($enumValue) { |
|
367 | + static function($enumValue) { |
|
368 | 368 | return $enumValue->name->value; |
369 | 369 | }, |
370 | - function ($enumValue) { |
|
370 | + function($enumValue) { |
|
371 | 371 | return [ |
372 | 372 | 'description' => $this->getDescription($enumValue), |
373 | 373 | 'deprecationReason' => $this->getDeprecationReason($enumValue), |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | 'types' => $def->types |
392 | 392 | ? Utils::map( |
393 | 393 | $def->types, |
394 | - function ($typeNode) { |
|
394 | + function($typeNode) { |
|
395 | 395 | return $this->buildType($typeNode); |
396 | 396 | } |
397 | 397 | ) : |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | 'name' => $def->name->value, |
407 | 407 | 'description' => $this->getDescription($def), |
408 | 408 | 'astNode' => $def, |
409 | - 'serialize' => static function ($value) { |
|
409 | + 'serialize' => static function($value) { |
|
410 | 410 | return $value; |
411 | 411 | }, |
412 | 412 | ]); |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | return new InputObjectType([ |
418 | 418 | 'name' => $def->name->value, |
419 | 419 | 'description' => $this->getDescription($def), |
420 | - 'fields' => function () use ($def) { |
|
420 | + 'fields' => function() use ($def) { |
|
421 | 421 | return $def->fields |
422 | 422 | ? $this->makeInputValues($def->fields) |
423 | 423 | : []; |