@@ -12,11 +12,11 @@ |
||
12 | 12 | * @inheritdoc |
13 | 13 | */ |
14 | 14 | public function read( |
15 | - int $code, |
|
16 | - int $pos, |
|
17 | - int $line, |
|
18 | - int $col, |
|
19 | - Token $prev |
|
15 | + int $code, |
|
16 | + int $pos, |
|
17 | + int $line, |
|
18 | + int $col, |
|
19 | + Token $prev |
|
20 | 20 | ): Token { |
21 | 21 | return $code === 40 |
22 | 22 | ? new Token(TokenKindEnum::PAREN_L, $pos, $pos + 1, $line, $col, |
@@ -12,14 +12,14 @@ |
||
12 | 12 | * @inheritdoc |
13 | 13 | */ |
14 | 14 | public function read( |
15 | - int $code, |
|
16 | - int $pos, |
|
17 | - int $line, |
|
18 | - int $col, |
|
19 | - Token $prev |
|
15 | + int $code, |
|
16 | + int $pos, |
|
17 | + int $line, |
|
18 | + int $col, |
|
19 | + Token $prev |
|
20 | 20 | ): Token { |
21 | 21 | return new Token(TokenKindEnum::COLON, $pos, $pos + 1, $line, $col, |
22 | - $prev); |
|
22 | + $prev); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | { |
62 | 62 | if (!isset($ast['kind'])) { |
63 | 63 | throw new LanguageException(sprintf('Nodes must specify a kind, got %s', |
64 | - json_encode($ast))); |
|
64 | + json_encode($ast))); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | ['kind' => $kind] = $ast; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | throw new LanguageException(sprintf('Node of kind "%s" not supported.', |
157 | - $kind)); |
|
157 | + $kind)); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | protected function buildArgument(array $ast): ArgumentNode |
167 | 167 | { |
168 | 168 | return new ArgumentNode([ |
169 | - 'name' => $this->buildNode($ast, 'name'), |
|
170 | - 'value' => $this->buildNode($ast, 'value'), |
|
171 | - 'location' => $this->createLocation($ast), |
|
169 | + 'name' => $this->buildNode($ast, 'name'), |
|
170 | + 'value' => $this->buildNode($ast, 'value'), |
|
171 | + 'location' => $this->createLocation($ast), |
|
172 | 172 | ]); |
173 | 173 | } |
174 | 174 | |
@@ -209,8 +209,8 @@ discard block |
||
209 | 209 | protected function buildBoolean(array $ast): BooleanValueNode |
210 | 210 | { |
211 | 211 | return new BooleanValueNode([ |
212 | - 'value' => $this->getValue($ast, 'value'), |
|
213 | - 'location' => $this->createLocation($ast), |
|
212 | + 'value' => $this->getValue($ast, 'value'), |
|
213 | + 'location' => $this->createLocation($ast), |
|
214 | 214 | ]); |
215 | 215 | } |
216 | 216 | |
@@ -224,9 +224,9 @@ discard block |
||
224 | 224 | * @return mixed|null |
225 | 225 | */ |
226 | 226 | protected function getValue( |
227 | - array $ast, |
|
228 | - string $propertyName, |
|
229 | - $defaultValue = null |
|
227 | + array $ast, |
|
228 | + string $propertyName, |
|
229 | + $defaultValue = null |
|
230 | 230 | ) { |
231 | 231 | return $ast[$propertyName] ?? $defaultValue; |
232 | 232 | } |
@@ -240,11 +240,11 @@ discard block |
||
240 | 240 | protected function buildDirectiveDefinition(array $ast |
241 | 241 | ): DirectiveDefinitionNode { |
242 | 242 | return new DirectiveDefinitionNode([ |
243 | - 'description' => $this->buildNode($ast, 'description'), |
|
244 | - 'name' => $this->buildNode($ast, 'name'), |
|
245 | - 'arguments' => $this->buildNodes($ast, 'arguments'), |
|
246 | - 'locations' => $this->buildNodes($ast, 'locations'), |
|
247 | - 'location' => $this->createLocation($ast), |
|
243 | + 'description' => $this->buildNode($ast, 'description'), |
|
244 | + 'name' => $this->buildNode($ast, 'name'), |
|
245 | + 'arguments' => $this->buildNodes($ast, 'arguments'), |
|
246 | + 'locations' => $this->buildNodes($ast, 'locations'), |
|
247 | + 'location' => $this->createLocation($ast), |
|
248 | 248 | ]); |
249 | 249 | } |
250 | 250 | |
@@ -279,9 +279,9 @@ discard block |
||
279 | 279 | protected function buildDirective(array $ast): DirectiveNode |
280 | 280 | { |
281 | 281 | return new DirectiveNode([ |
282 | - 'name' => $this->buildNode($ast, 'name'), |
|
283 | - 'arguments' => $this->buildNodes($ast, 'arguments'), |
|
284 | - 'location' => $this->createLocation($ast), |
|
282 | + 'name' => $this->buildNode($ast, 'name'), |
|
283 | + 'arguments' => $this->buildNodes($ast, 'arguments'), |
|
284 | + 'location' => $this->createLocation($ast), |
|
285 | 285 | ]); |
286 | 286 | } |
287 | 287 | |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | protected function buildDocument(array $ast): DocumentNode |
295 | 295 | { |
296 | 296 | return new DocumentNode([ |
297 | - 'definitions' => $this->buildNodes($ast, 'definitions'), |
|
298 | - 'location' => $this->createLocation($ast), |
|
297 | + 'definitions' => $this->buildNodes($ast, 'definitions'), |
|
298 | + 'location' => $this->createLocation($ast), |
|
299 | 299 | ]); |
300 | 300 | } |
301 | 301 | |
@@ -307,8 +307,8 @@ discard block |
||
307 | 307 | protected function buildEnum(array $ast): EnumValueNode |
308 | 308 | { |
309 | 309 | return new EnumValueNode([ |
310 | - 'value' => $this->getValue($ast, 'value'), |
|
311 | - 'location' => $this->createLocation($ast), |
|
310 | + 'value' => $this->getValue($ast, 'value'), |
|
311 | + 'location' => $this->createLocation($ast), |
|
312 | 312 | ]); |
313 | 313 | } |
314 | 314 | |
@@ -321,11 +321,11 @@ discard block |
||
321 | 321 | protected function buildEnumTypeDefinition(array $ast |
322 | 322 | ): EnumTypeDefinitionNode { |
323 | 323 | return new EnumTypeDefinitionNode([ |
324 | - 'description' => $this->buildNode($ast, 'description'), |
|
325 | - 'name' => $this->buildNode($ast, 'name'), |
|
326 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
327 | - 'values' => $this->buildNodes($ast, 'values'), |
|
328 | - 'location' => $this->createLocation($ast), |
|
324 | + 'description' => $this->buildNode($ast, 'description'), |
|
325 | + 'name' => $this->buildNode($ast, 'name'), |
|
326 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
327 | + 'values' => $this->buildNodes($ast, 'values'), |
|
328 | + 'location' => $this->createLocation($ast), |
|
329 | 329 | ]); |
330 | 330 | } |
331 | 331 | |
@@ -338,10 +338,10 @@ discard block |
||
338 | 338 | protected function buildEnumTypeExtension(array $ast): EnumTypeExtensionNode |
339 | 339 | { |
340 | 340 | return new EnumTypeExtensionNode([ |
341 | - 'name' => $this->buildNode($ast, 'name'), |
|
342 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
343 | - 'values' => $this->buildNodes($ast, 'values'), |
|
344 | - 'location' => $this->createLocation($ast), |
|
341 | + 'name' => $this->buildNode($ast, 'name'), |
|
342 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
343 | + 'values' => $this->buildNodes($ast, 'values'), |
|
344 | + 'location' => $this->createLocation($ast), |
|
345 | 345 | ]); |
346 | 346 | } |
347 | 347 | |
@@ -354,10 +354,10 @@ discard block |
||
354 | 354 | protected function buildEnumValueDefinition(array $ast |
355 | 355 | ): EnumValueDefinitionNode { |
356 | 356 | return new EnumValueDefinitionNode([ |
357 | - 'description' => $this->buildNode($ast, 'description'), |
|
358 | - 'name' => $this->buildNode($ast, 'name'), |
|
359 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
360 | - 'location' => $this->createLocation($ast), |
|
357 | + 'description' => $this->buildNode($ast, 'description'), |
|
358 | + 'name' => $this->buildNode($ast, 'name'), |
|
359 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
360 | + 'location' => $this->createLocation($ast), |
|
361 | 361 | ]); |
362 | 362 | } |
363 | 363 | |
@@ -370,12 +370,12 @@ discard block |
||
370 | 370 | protected function buildField(array $ast): FieldNode |
371 | 371 | { |
372 | 372 | return new FieldNode([ |
373 | - 'alias' => $this->buildNode($ast, 'alias'), |
|
374 | - 'name' => $this->buildNode($ast, 'name'), |
|
375 | - 'arguments' => $this->buildNodes($ast, 'arguments'), |
|
376 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
377 | - 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
378 | - 'location' => $this->createLocation($ast), |
|
373 | + 'alias' => $this->buildNode($ast, 'alias'), |
|
374 | + 'name' => $this->buildNode($ast, 'name'), |
|
375 | + 'arguments' => $this->buildNodes($ast, 'arguments'), |
|
376 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
377 | + 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
378 | + 'location' => $this->createLocation($ast), |
|
379 | 379 | ]); |
380 | 380 | } |
381 | 381 | |
@@ -388,12 +388,12 @@ discard block |
||
388 | 388 | protected function buildFieldDefinition(array $ast): FieldDefinitionNode |
389 | 389 | { |
390 | 390 | return new FieldDefinitionNode([ |
391 | - 'description' => $this->buildNode($ast, 'description'), |
|
392 | - 'name' => $this->buildNode($ast, 'name'), |
|
393 | - 'arguments' => $this->buildNodes($ast, 'arguments'), |
|
394 | - 'type' => $this->buildNode($ast, 'type'), |
|
395 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
396 | - 'location' => $this->createLocation($ast), |
|
391 | + 'description' => $this->buildNode($ast, 'description'), |
|
392 | + 'name' => $this->buildNode($ast, 'name'), |
|
393 | + 'arguments' => $this->buildNodes($ast, 'arguments'), |
|
394 | + 'type' => $this->buildNode($ast, 'type'), |
|
395 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
396 | + 'location' => $this->createLocation($ast), |
|
397 | 397 | ]); |
398 | 398 | } |
399 | 399 | |
@@ -405,8 +405,8 @@ discard block |
||
405 | 405 | protected function buildFloat(array $ast): FloatValueNode |
406 | 406 | { |
407 | 407 | return new FloatValueNode([ |
408 | - 'value' => $this->getValue($ast, 'value'), |
|
409 | - 'location' => $this->createLocation($ast), |
|
408 | + 'value' => $this->getValue($ast, 'value'), |
|
409 | + 'location' => $this->createLocation($ast), |
|
410 | 410 | ]); |
411 | 411 | } |
412 | 412 | |
@@ -419,13 +419,13 @@ discard block |
||
419 | 419 | protected function buildFragmentDefinition(array $ast |
420 | 420 | ): FragmentDefinitionNode { |
421 | 421 | return new FragmentDefinitionNode([ |
422 | - 'name' => $this->buildNode($ast, 'name'), |
|
423 | - 'variableDefinitions' => $this->buildNodes($ast, |
|
422 | + 'name' => $this->buildNode($ast, 'name'), |
|
423 | + 'variableDefinitions' => $this->buildNodes($ast, |
|
424 | 424 | 'variableDefinitions'), |
425 | - 'typeCondition' => $this->buildNode($ast, 'typeCondition'), |
|
426 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
427 | - 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
428 | - 'location' => $this->createLocation($ast), |
|
425 | + 'typeCondition' => $this->buildNode($ast, 'typeCondition'), |
|
426 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
427 | + 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
428 | + 'location' => $this->createLocation($ast), |
|
429 | 429 | ]); |
430 | 430 | } |
431 | 431 | |
@@ -438,10 +438,10 @@ discard block |
||
438 | 438 | protected function buildFragmentSpread(array $ast): FragmentSpreadNode |
439 | 439 | { |
440 | 440 | return new FragmentSpreadNode([ |
441 | - 'name' => $this->buildNode($ast, 'name'), |
|
442 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
443 | - 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
444 | - 'location' => $this->createLocation($ast), |
|
441 | + 'name' => $this->buildNode($ast, 'name'), |
|
442 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
443 | + 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
444 | + 'location' => $this->createLocation($ast), |
|
445 | 445 | ]); |
446 | 446 | } |
447 | 447 | |
@@ -454,10 +454,10 @@ discard block |
||
454 | 454 | protected function buildInlineFragment(array $ast): InlineFragmentNode |
455 | 455 | { |
456 | 456 | return new InlineFragmentNode([ |
457 | - 'typeCondition' => $this->buildNode($ast, 'typeCondition'), |
|
458 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
459 | - 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
460 | - 'location' => $this->createLocation($ast), |
|
457 | + 'typeCondition' => $this->buildNode($ast, 'typeCondition'), |
|
458 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
459 | + 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
460 | + 'location' => $this->createLocation($ast), |
|
461 | 461 | ]); |
462 | 462 | } |
463 | 463 | |
@@ -470,11 +470,11 @@ discard block |
||
470 | 470 | protected function buildInputObjectTypeDefinition(array $ast |
471 | 471 | ): InputObjectTypeDefinitionNode { |
472 | 472 | return new InputObjectTypeDefinitionNode([ |
473 | - 'description' => $this->buildNode($ast, 'description'), |
|
474 | - 'name' => $this->buildNode($ast, 'name'), |
|
475 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
476 | - 'fields' => $this->buildNodes($ast, 'fields'), |
|
477 | - 'location' => $this->createLocation($ast), |
|
473 | + 'description' => $this->buildNode($ast, 'description'), |
|
474 | + 'name' => $this->buildNode($ast, 'name'), |
|
475 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
476 | + 'fields' => $this->buildNodes($ast, 'fields'), |
|
477 | + 'location' => $this->createLocation($ast), |
|
478 | 478 | ]); |
479 | 479 | } |
480 | 480 | |
@@ -487,10 +487,10 @@ discard block |
||
487 | 487 | protected function buildInputObjectTypeExtension(array $ast |
488 | 488 | ): InputObjectTypeExtensionNode { |
489 | 489 | return new InputObjectTypeExtensionNode([ |
490 | - 'name' => $this->buildNode($ast, 'name'), |
|
491 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
492 | - 'fields' => $this->buildNodes($ast, 'fields'), |
|
493 | - 'location' => $this->createLocation($ast), |
|
490 | + 'name' => $this->buildNode($ast, 'name'), |
|
491 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
492 | + 'fields' => $this->buildNodes($ast, 'fields'), |
|
493 | + 'location' => $this->createLocation($ast), |
|
494 | 494 | ]); |
495 | 495 | } |
496 | 496 | |
@@ -503,12 +503,12 @@ discard block |
||
503 | 503 | protected function buildInputValueDefinition(array $ast |
504 | 504 | ): InputValueDefinitionNode { |
505 | 505 | return new InputValueDefinitionNode([ |
506 | - 'description' => $this->buildNode($ast, 'description'), |
|
507 | - 'name' => $this->buildNode($ast, 'name'), |
|
508 | - 'type' => $this->buildNode($ast, 'type'), |
|
509 | - 'defaultValue' => $this->buildNode($ast, 'defaultValue'), |
|
510 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
511 | - 'location' => $this->createLocation($ast), |
|
506 | + 'description' => $this->buildNode($ast, 'description'), |
|
507 | + 'name' => $this->buildNode($ast, 'name'), |
|
508 | + 'type' => $this->buildNode($ast, 'type'), |
|
509 | + 'defaultValue' => $this->buildNode($ast, 'defaultValue'), |
|
510 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
511 | + 'location' => $this->createLocation($ast), |
|
512 | 512 | ]); |
513 | 513 | } |
514 | 514 | |
@@ -521,11 +521,11 @@ discard block |
||
521 | 521 | protected function buildInterfaceTypeDefinition(array $ast |
522 | 522 | ): InterfaceTypeDefinitionNode { |
523 | 523 | return new InterfaceTypeDefinitionNode([ |
524 | - 'description' => $this->buildNode($ast, 'description'), |
|
525 | - 'name' => $this->buildNode($ast, 'name'), |
|
526 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
527 | - 'fields' => $this->buildNodes($ast, 'fields'), |
|
528 | - 'location' => $this->createLocation($ast), |
|
524 | + 'description' => $this->buildNode($ast, 'description'), |
|
525 | + 'name' => $this->buildNode($ast, 'name'), |
|
526 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
527 | + 'fields' => $this->buildNodes($ast, 'fields'), |
|
528 | + 'location' => $this->createLocation($ast), |
|
529 | 529 | ]); |
530 | 530 | } |
531 | 531 | |
@@ -538,10 +538,10 @@ discard block |
||
538 | 538 | protected function buildInterfaceTypeExtension(array $ast |
539 | 539 | ): InterfaceTypeExtensionNode { |
540 | 540 | return new InterfaceTypeExtensionNode([ |
541 | - 'name' => $this->buildNode($ast, 'name'), |
|
542 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
543 | - 'fields' => $this->buildNodes($ast, 'fields'), |
|
544 | - 'location' => $this->createLocation($ast), |
|
541 | + 'name' => $this->buildNode($ast, 'name'), |
|
542 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
543 | + 'fields' => $this->buildNodes($ast, 'fields'), |
|
544 | + 'location' => $this->createLocation($ast), |
|
545 | 545 | ]); |
546 | 546 | } |
547 | 547 | |
@@ -553,8 +553,8 @@ discard block |
||
553 | 553 | protected function buildInt(array $ast): IntValueNode |
554 | 554 | { |
555 | 555 | return new IntValueNode([ |
556 | - 'value' => $this->getValue($ast, 'value'), |
|
557 | - 'location' => $this->createLocation($ast), |
|
556 | + 'value' => $this->getValue($ast, 'value'), |
|
557 | + 'location' => $this->createLocation($ast), |
|
558 | 558 | ]); |
559 | 559 | } |
560 | 560 | |
@@ -567,8 +567,8 @@ discard block |
||
567 | 567 | protected function buildListType(array $ast): ListTypeNode |
568 | 568 | { |
569 | 569 | return new ListTypeNode([ |
570 | - 'type' => $this->buildNode($ast, 'type'), |
|
571 | - 'location' => $this->createLocation($ast), |
|
570 | + 'type' => $this->buildNode($ast, 'type'), |
|
571 | + 'location' => $this->createLocation($ast), |
|
572 | 572 | ]); |
573 | 573 | } |
574 | 574 | |
@@ -581,8 +581,8 @@ discard block |
||
581 | 581 | protected function buildList(array $ast): ListValueNode |
582 | 582 | { |
583 | 583 | return new ListValueNode([ |
584 | - 'values' => $this->buildNodes($ast, 'values'), |
|
585 | - 'location' => $this->createLocation($ast), |
|
584 | + 'values' => $this->buildNodes($ast, 'values'), |
|
585 | + 'location' => $this->createLocation($ast), |
|
586 | 586 | ]); |
587 | 587 | } |
588 | 588 | |
@@ -595,8 +595,8 @@ discard block |
||
595 | 595 | protected function buildNamedType(array $ast): NamedTypeNode |
596 | 596 | { |
597 | 597 | return new NamedTypeNode([ |
598 | - 'name' => $this->buildNode($ast, 'name'), |
|
599 | - 'location' => $this->createLocation($ast), |
|
598 | + 'name' => $this->buildNode($ast, 'name'), |
|
599 | + 'location' => $this->createLocation($ast), |
|
600 | 600 | ]); |
601 | 601 | } |
602 | 602 | |
@@ -608,8 +608,8 @@ discard block |
||
608 | 608 | protected function buildName(array $ast): NameNode |
609 | 609 | { |
610 | 610 | return new NameNode([ |
611 | - 'value' => $this->getValue($ast, 'value'), |
|
612 | - 'location' => $this->createLocation($ast), |
|
611 | + 'value' => $this->getValue($ast, 'value'), |
|
612 | + 'location' => $this->createLocation($ast), |
|
613 | 613 | ]); |
614 | 614 | } |
615 | 615 | |
@@ -622,8 +622,8 @@ discard block |
||
622 | 622 | protected function buildNonNullType(array $ast): NonNullTypeNode |
623 | 623 | { |
624 | 624 | return new NonNullTypeNode([ |
625 | - 'type' => $this->buildNode($ast, 'type'), |
|
626 | - 'location' => $this->createLocation($ast), |
|
625 | + 'type' => $this->buildNode($ast, 'type'), |
|
626 | + 'location' => $this->createLocation($ast), |
|
627 | 627 | ]); |
628 | 628 | } |
629 | 629 | |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | protected function buildNull(array $ast): NullValueNode |
636 | 636 | { |
637 | 637 | return new NullValueNode([ |
638 | - 'location' => $this->createLocation($ast), |
|
638 | + 'location' => $this->createLocation($ast), |
|
639 | 639 | ]); |
640 | 640 | } |
641 | 641 | |
@@ -648,9 +648,9 @@ discard block |
||
648 | 648 | protected function buildObjectField(array $ast): ObjectFieldNode |
649 | 649 | { |
650 | 650 | return new ObjectFieldNode([ |
651 | - 'name' => $this->buildNode($ast, 'name'), |
|
652 | - 'value' => $this->buildNode($ast, 'value'), |
|
653 | - 'location' => $this->createLocation($ast), |
|
651 | + 'name' => $this->buildNode($ast, 'name'), |
|
652 | + 'value' => $this->buildNode($ast, 'value'), |
|
653 | + 'location' => $this->createLocation($ast), |
|
654 | 654 | ]); |
655 | 655 | } |
656 | 656 | |
@@ -663,12 +663,12 @@ discard block |
||
663 | 663 | protected function buildObjectTypeDefinition(array $ast |
664 | 664 | ): ObjectTypeDefinitionNode { |
665 | 665 | return new ObjectTypeDefinitionNode([ |
666 | - 'description' => $this->buildNode($ast, 'description'), |
|
667 | - 'name' => $this->buildNode($ast, 'name'), |
|
668 | - 'interfaces' => $this->buildNodes($ast, 'interfaces'), |
|
669 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
670 | - 'fields' => $this->buildNodes($ast, 'fields'), |
|
671 | - 'location' => $this->createLocation($ast), |
|
666 | + 'description' => $this->buildNode($ast, 'description'), |
|
667 | + 'name' => $this->buildNode($ast, 'name'), |
|
668 | + 'interfaces' => $this->buildNodes($ast, 'interfaces'), |
|
669 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
670 | + 'fields' => $this->buildNodes($ast, 'fields'), |
|
671 | + 'location' => $this->createLocation($ast), |
|
672 | 672 | ]); |
673 | 673 | } |
674 | 674 | |
@@ -681,11 +681,11 @@ discard block |
||
681 | 681 | protected function buildObjectTypeExtension(array $ast |
682 | 682 | ): ObjectTypeExtensionNode { |
683 | 683 | return new ObjectTypeExtensionNode([ |
684 | - 'name' => $this->buildNode($ast, 'name'), |
|
685 | - 'interfaces' => $this->buildNodes($ast, 'interfaces'), |
|
686 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
687 | - 'fields' => $this->buildNodes($ast, 'fields'), |
|
688 | - 'location' => $this->createLocation($ast), |
|
684 | + 'name' => $this->buildNode($ast, 'name'), |
|
685 | + 'interfaces' => $this->buildNodes($ast, 'interfaces'), |
|
686 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
687 | + 'fields' => $this->buildNodes($ast, 'fields'), |
|
688 | + 'location' => $this->createLocation($ast), |
|
689 | 689 | ]); |
690 | 690 | } |
691 | 691 | |
@@ -698,8 +698,8 @@ discard block |
||
698 | 698 | protected function buildObject(array $ast): ObjectValueNode |
699 | 699 | { |
700 | 700 | return new ObjectValueNode([ |
701 | - 'fields' => $this->buildNodes($ast, 'fields'), |
|
702 | - 'location' => $this->createLocation($ast), |
|
701 | + 'fields' => $this->buildNodes($ast, 'fields'), |
|
702 | + 'location' => $this->createLocation($ast), |
|
703 | 703 | ]); |
704 | 704 | } |
705 | 705 | |
@@ -712,13 +712,13 @@ discard block |
||
712 | 712 | protected function buildOperationDefinition(array $ast |
713 | 713 | ): OperationDefinitionNode { |
714 | 714 | return new OperationDefinitionNode([ |
715 | - 'operation' => $this->getValue($ast, 'operation'), |
|
716 | - 'name' => $this->buildNode($ast, 'name'), |
|
717 | - 'variableDefinitions' => $this->buildNodes($ast, |
|
715 | + 'operation' => $this->getValue($ast, 'operation'), |
|
716 | + 'name' => $this->buildNode($ast, 'name'), |
|
717 | + 'variableDefinitions' => $this->buildNodes($ast, |
|
718 | 718 | 'variableDefinitions'), |
719 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
720 | - 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
721 | - 'location' => $this->createLocation($ast), |
|
719 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
720 | + 'selectionSet' => $this->buildNode($ast, 'selectionSet'), |
|
721 | + 'location' => $this->createLocation($ast), |
|
722 | 722 | ]); |
723 | 723 | } |
724 | 724 | |
@@ -731,9 +731,9 @@ discard block |
||
731 | 731 | protected function buildOperationTypeDefinition(array $ast |
732 | 732 | ): OperationTypeDefinitionNode { |
733 | 733 | return new OperationTypeDefinitionNode([ |
734 | - 'operation' => $this->getValue($ast, 'operation'), |
|
735 | - 'type' => $this->buildNode($ast, 'type'), |
|
736 | - 'location' => $this->createLocation($ast), |
|
734 | + 'operation' => $this->getValue($ast, 'operation'), |
|
735 | + 'type' => $this->buildNode($ast, 'type'), |
|
736 | + 'location' => $this->createLocation($ast), |
|
737 | 737 | ]); |
738 | 738 | } |
739 | 739 | |
@@ -746,10 +746,10 @@ discard block |
||
746 | 746 | protected function buildScalarTypeDefinition(array $ast |
747 | 747 | ): ScalarTypeDefinitionNode { |
748 | 748 | return new ScalarTypeDefinitionNode([ |
749 | - 'description' => $this->buildNode($ast, 'description'), |
|
750 | - 'name' => $this->buildNode($ast, 'name'), |
|
751 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
752 | - 'location' => $this->createLocation($ast), |
|
749 | + 'description' => $this->buildNode($ast, 'description'), |
|
750 | + 'name' => $this->buildNode($ast, 'name'), |
|
751 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
752 | + 'location' => $this->createLocation($ast), |
|
753 | 753 | ]); |
754 | 754 | } |
755 | 755 | |
@@ -762,9 +762,9 @@ discard block |
||
762 | 762 | protected function buildScalarTypeExtension(array $ast |
763 | 763 | ): ScalarTypeExtensionNode { |
764 | 764 | return new ScalarTypeExtensionNode([ |
765 | - 'name' => $this->buildNode($ast, 'name'), |
|
766 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
767 | - 'location' => $this->createLocation($ast), |
|
765 | + 'name' => $this->buildNode($ast, 'name'), |
|
766 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
767 | + 'location' => $this->createLocation($ast), |
|
768 | 768 | ]); |
769 | 769 | } |
770 | 770 | |
@@ -777,9 +777,9 @@ discard block |
||
777 | 777 | protected function buildSchemaDefinition(array $ast): SchemaDefinitionNode |
778 | 778 | { |
779 | 779 | return new SchemaDefinitionNode([ |
780 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
781 | - 'operationTypes' => $this->buildNodes($ast, 'operationTypes'), |
|
782 | - 'location' => $this->createLocation($ast), |
|
780 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
781 | + 'operationTypes' => $this->buildNodes($ast, 'operationTypes'), |
|
782 | + 'location' => $this->createLocation($ast), |
|
783 | 783 | ]); |
784 | 784 | } |
785 | 785 | |
@@ -792,8 +792,8 @@ discard block |
||
792 | 792 | protected function buildSelectionSet(array $ast): SelectionSetNode |
793 | 793 | { |
794 | 794 | return new SelectionSetNode([ |
795 | - 'selections' => $this->buildNodes($ast, 'selections'), |
|
796 | - 'location' => $this->createLocation($ast), |
|
795 | + 'selections' => $this->buildNodes($ast, 'selections'), |
|
796 | + 'location' => $this->createLocation($ast), |
|
797 | 797 | ]); |
798 | 798 | } |
799 | 799 | |
@@ -805,9 +805,9 @@ discard block |
||
805 | 805 | protected function buildString(array $ast): StringValueNode |
806 | 806 | { |
807 | 807 | return new StringValueNode([ |
808 | - 'value' => $this->getValue($ast, 'value'), |
|
809 | - 'block' => $this->getValue($ast, 'block', false), |
|
810 | - 'location' => $this->createLocation($ast), |
|
808 | + 'value' => $this->getValue($ast, 'value'), |
|
809 | + 'block' => $this->getValue($ast, 'block', false), |
|
810 | + 'location' => $this->createLocation($ast), |
|
811 | 811 | ]); |
812 | 812 | } |
813 | 813 | |
@@ -820,11 +820,11 @@ discard block |
||
820 | 820 | protected function buildUnionTypeDefinition(array $ast |
821 | 821 | ): UnionTypeDefinitionNode { |
822 | 822 | return new UnionTypeDefinitionNode([ |
823 | - 'description' => $this->buildNode($ast, 'description'), |
|
824 | - 'name' => $this->buildNode($ast, 'name'), |
|
825 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
826 | - 'types' => $this->buildNodes($ast, 'types'), |
|
827 | - 'location' => $this->createLocation($ast), |
|
823 | + 'description' => $this->buildNode($ast, 'description'), |
|
824 | + 'name' => $this->buildNode($ast, 'name'), |
|
825 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
826 | + 'types' => $this->buildNodes($ast, 'types'), |
|
827 | + 'location' => $this->createLocation($ast), |
|
828 | 828 | ]); |
829 | 829 | } |
830 | 830 | |
@@ -837,10 +837,10 @@ discard block |
||
837 | 837 | protected function buildUnionTypeExtension(array $ast |
838 | 838 | ): UnionTypeExtensionNode { |
839 | 839 | return new UnionTypeExtensionNode([ |
840 | - 'name' => $this->buildNode($ast, 'name'), |
|
841 | - 'directives' => $this->buildNodes($ast, 'directives'), |
|
842 | - 'types' => $this->buildNodes($ast, 'types'), |
|
843 | - 'location' => $this->createLocation($ast), |
|
840 | + 'name' => $this->buildNode($ast, 'name'), |
|
841 | + 'directives' => $this->buildNodes($ast, 'directives'), |
|
842 | + 'types' => $this->buildNodes($ast, 'types'), |
|
843 | + 'location' => $this->createLocation($ast), |
|
844 | 844 | ]); |
845 | 845 | } |
846 | 846 | |
@@ -853,10 +853,10 @@ discard block |
||
853 | 853 | protected function buildVariableDefinition(array $ast |
854 | 854 | ): VariableDefinitionNode { |
855 | 855 | return new VariableDefinitionNode([ |
856 | - 'variable' => $this->buildNode($ast, 'variable'), |
|
857 | - 'type' => $this->buildNode($ast, 'type'), |
|
858 | - 'defaultValue' => $this->buildNode($ast, 'defaultValue'), |
|
859 | - 'location' => $this->createLocation($ast), |
|
856 | + 'variable' => $this->buildNode($ast, 'variable'), |
|
857 | + 'type' => $this->buildNode($ast, 'type'), |
|
858 | + 'defaultValue' => $this->buildNode($ast, 'defaultValue'), |
|
859 | + 'location' => $this->createLocation($ast), |
|
860 | 860 | ]); |
861 | 861 | } |
862 | 862 | |
@@ -869,8 +869,8 @@ discard block |
||
869 | 869 | protected function buildVariable(array $ast): VariableNode |
870 | 870 | { |
871 | 871 | return new VariableNode([ |
872 | - 'name' => $this->buildNode($ast, 'name'), |
|
873 | - 'location' => $this->createLocation($ast), |
|
872 | + 'name' => $this->buildNode($ast, 'name'), |
|
873 | + 'location' => $this->createLocation($ast), |
|
874 | 874 | ]); |
875 | 875 | } |
876 | 876 | } |
@@ -31,13 +31,13 @@ |
||
31 | 31 | public function toArray(): array |
32 | 32 | { |
33 | 33 | return [ |
34 | - 'kind' => $this->kind, |
|
35 | - 'loc' => $this->getLocationAsArray(), |
|
36 | - 'operation' => $this->operation, |
|
37 | - 'name' => $this->getNameAsArray(), |
|
38 | - 'variableDefinitions' => $this->getVariableDefinitionsAsArray(), |
|
39 | - 'directives' => $this->getDirectivesAsArray(), |
|
40 | - 'selectionSet' => $this->getSelectionSetAsArray(), |
|
34 | + 'kind' => $this->kind, |
|
35 | + 'loc' => $this->getLocationAsArray(), |
|
36 | + 'operation' => $this->operation, |
|
37 | + 'name' => $this->getNameAsArray(), |
|
38 | + 'variableDefinitions' => $this->getVariableDefinitionsAsArray(), |
|
39 | + 'directives' => $this->getDirectivesAsArray(), |
|
40 | + 'selectionSet' => $this->getSelectionSetAsArray(), |
|
41 | 41 | ]; |
42 | 42 | } |
43 | 43 | } |
@@ -31,10 +31,10 @@ |
||
31 | 31 | public function toArray(): array |
32 | 32 | { |
33 | 33 | return [ |
34 | - 'kind' => $this->kind, |
|
35 | - 'loc' => $this->getLocationAsArray(), |
|
36 | - 'block' => $this->block, |
|
37 | - 'value' => $this->value, |
|
34 | + 'kind' => $this->kind, |
|
35 | + 'loc' => $this->getLocationAsArray(), |
|
36 | + 'block' => $this->block, |
|
37 | + 'value' => $this->value, |
|
38 | 38 | ]; |
39 | 39 | } |
40 | 40 | } |
@@ -57,12 +57,12 @@ |
||
57 | 57 | public function toArray(): array |
58 | 58 | { |
59 | 59 | return [ |
60 | - 'kind' => $this->kind, |
|
61 | - 'description' => $this->getDescriptionAsArray(), |
|
62 | - 'name' => $this->getNameAsArray(), |
|
63 | - 'arguments' => $this->getArgumentsAsArray(), |
|
64 | - 'locations' => $this->getLocationsAsArray(), |
|
65 | - 'loc' => $this->getLocationAsArray(), |
|
60 | + 'kind' => $this->kind, |
|
61 | + 'description' => $this->getDescriptionAsArray(), |
|
62 | + 'name' => $this->getNameAsArray(), |
|
63 | + 'arguments' => $this->getArgumentsAsArray(), |
|
64 | + 'locations' => $this->getLocationsAsArray(), |
|
65 | + 'loc' => $this->getLocationAsArray(), |
|
66 | 66 | ]; |
67 | 67 | } |
68 | 68 | } |
@@ -18,9 +18,9 @@ |
||
18 | 18 | public function toArray(): array |
19 | 19 | { |
20 | 20 | return [ |
21 | - 'kind' => $this->kind, |
|
22 | - 'loc' => $this->getLocationAsArray(), |
|
23 | - 'value' => $this->value, |
|
21 | + 'kind' => $this->kind, |
|
22 | + 'loc' => $this->getLocationAsArray(), |
|
23 | + 'value' => $this->value, |
|
24 | 24 | ]; |
25 | 25 | } |
26 | 26 | } |
@@ -21,12 +21,12 @@ |
||
21 | 21 | public function toArray(): array |
22 | 22 | { |
23 | 23 | return [ |
24 | - 'kind' => $this->kind, |
|
25 | - 'description' => $this->getDescriptionAsArray(), |
|
26 | - 'name' => $this->getNameAsArray(), |
|
27 | - 'directives' => $this->getDirectivesAsArray(), |
|
28 | - 'values' => $this->getValuesAsArray(), |
|
29 | - 'loc' => $this->getLocationAsArray(), |
|
24 | + 'kind' => $this->kind, |
|
25 | + 'description' => $this->getDescriptionAsArray(), |
|
26 | + 'name' => $this->getNameAsArray(), |
|
27 | + 'directives' => $this->getDirectivesAsArray(), |
|
28 | + 'values' => $this->getValuesAsArray(), |
|
29 | + 'loc' => $this->getLocationAsArray(), |
|
30 | 30 | ]; |
31 | 31 | } |
32 | 32 | } |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | namespace Digia\GraphQL\Language\Node; |
4 | 4 | |
5 | 5 | class FieldDefinitionNode extends AbstractNode implements DefinitionNodeInterface, DirectivesAwareInterface, |
6 | - NameAwareInterface |
|
6 | + NameAwareInterface |
|
7 | 7 | { |
8 | 8 | |
9 | 9 | use DescriptionTrait; |
@@ -23,13 +23,13 @@ discard block |
||
23 | 23 | public function toArray(): array |
24 | 24 | { |
25 | 25 | return [ |
26 | - 'kind' => $this->kind, |
|
27 | - 'description' => $this->description, |
|
28 | - 'name' => $this->getNameAsArray(), |
|
29 | - 'arguments' => $this->getArgumentsAsArray(), |
|
30 | - 'type' => $this->getTypeAsArray(), |
|
31 | - 'directives' => $this->getDirectivesAsArray(), |
|
32 | - 'loc' => $this->getLocationAsArray(), |
|
26 | + 'kind' => $this->kind, |
|
27 | + 'description' => $this->description, |
|
28 | + 'name' => $this->getNameAsArray(), |
|
29 | + 'arguments' => $this->getArgumentsAsArray(), |
|
30 | + 'type' => $this->getTypeAsArray(), |
|
31 | + 'directives' => $this->getDirectivesAsArray(), |
|
32 | + 'loc' => $this->getLocationAsArray(), |
|
33 | 33 | ]; |
34 | 34 | } |
35 | 35 | } |