|
292 | 292 | // The "$offset" variable is an auto-generated |
293 | 293 | $offset = $ctx->lastProcessedToken->getOffset(); |
294 | 294 |
|
295 | | - if ($this->literals === false) { |
| 295 | + if ($this->features->literals === false) { |
296 | 296 | throw FeatureNotAllowedException::fromFeature('literal values', $offset); |
297 | 297 | } |
298 | 298 | return $children; |
|
378 | 378 | $hint = $attributes = null; |
379 | 379 |
|
380 | 380 | if (\reset($children) instanceof Node\Type\Attribute\AttributeGroupsListNode) { |
381 | | - if ($this->attributes === false) { |
| 381 | + if ($this->features->attributes === false) { |
382 | 382 | throw FeatureNotAllowedException::fromFeature('template argument attributes', $offset); |
383 | 383 | } |
384 | 384 |
|
|
388 | 388 | $type = \array_pop($children); |
389 | 389 |
|
390 | 390 | if (\reset($children) !== false) { |
391 | | - if ($this->hints === false) { |
| 391 | + if ($this->features->hints === false) { |
392 | 392 | throw FeatureNotAllowedException::fromFeature('template argument hints', $offset); |
393 | 393 | } |
394 | 394 |
|
|
405 | 405 | // The "$offset" variable is an auto-generated |
406 | 406 | $offset = $ctx->lastProcessedToken->getOffset(); |
407 | 407 |
|
408 | | - if ($this->generics === false) { |
| 408 | + if ($this->features->generics === false) { |
409 | 409 | throw FeatureNotAllowedException::fromFeature('template arguments', $offset); |
410 | 410 | } |
411 | 411 |
|
|
423 | 423 |
|
424 | 424 | $name = \array_shift($children); |
425 | 425 |
|
426 | | - if ($this->callables === false) { |
| 426 | + if ($this->features->callables === false) { |
427 | 427 | throw FeatureNotAllowedException::fromFeature('callable types', $offset); |
428 | 428 | } |
429 | 429 |
|
|
444 | 444 | $result = \end($children); |
445 | 445 |
|
446 | 446 | if ($children[0] instanceof Node\Type\Attribute\AttributeGroupsListNode) { |
447 | | - if ($this->attributes === false) { |
| 447 | + if ($this->features->attributes === false) { |
448 | 448 | throw FeatureNotAllowedException::fromFeature('callable parameter attributes', $offset); |
449 | 449 | } |
450 | 450 |
|
|
584 | 584 | return new Node\Type\Shape\FieldsListNode(); |
585 | 585 | } |
586 | 586 |
|
587 | | - if ($this->shapes === false) { |
| 587 | + if ($this->features->shapes === false) { |
588 | 588 | throw FeatureNotAllowedException::fromFeature('shape fields', $offset); |
589 | 589 | } |
590 | 590 |
|
|
611 | 611 | $result = \end($children); |
612 | 612 |
|
613 | 613 | if ($children[0] instanceof Node\Type\Attribute\AttributeGroupsListNode) { |
614 | | - if ($this->attributes === false) { |
| 614 | + if ($this->features->attributes === false) { |
615 | 615 | throw FeatureNotAllowedException::fromFeature('shape field attributes', $offset); |
616 | 616 | } |
617 | 617 |
|
|
673 | 673 | return $children[0]; |
674 | 674 | } |
675 | 675 |
|
676 | | - if ($this->conditional === false) { |
| 676 | + if ($this->features->conditions === false) { |
677 | 677 | throw FeatureNotAllowedException::fromFeature('conditional expressions', $offset); |
678 | 678 | } |
679 | 679 |
|
|
733 | 733 | $offset = $ctx->lastProcessedToken->getOffset(); |
734 | 734 |
|
735 | 735 | if (\count($children) === 2) { |
736 | | - if ($this->union === false) { |
| 736 | + if ($this->features->unions === false) { |
737 | 737 | throw FeatureNotAllowedException::fromFeature('union types', $offset); |
738 | 738 | } |
739 | 739 |
|
|
747 | 747 | $offset = $ctx->lastProcessedToken->getOffset(); |
748 | 748 |
|
749 | 749 | if (\count($children) === 2) { |
750 | | - if ($this->intersection === false) { |
| 750 | + if ($this->features->intersections === false) { |
751 | 751 | throw FeatureNotAllowedException::fromFeature('intersection types', $offset); |
752 | 752 | } |
753 | 753 |
|
|
773 | 773 | switch (true) { |
774 | 774 | // In case of list type |
775 | 775 | case $child === true: |
776 | | - if ($this->list === false) { |
| 776 | + if ($this->features->lists === false) { |
777 | 777 | throw FeatureNotAllowedException::fromFeature('square bracket list types', $offset); |
778 | 778 | } |
779 | 779 |
|
780 | 780 | $statement = new Node\Type\TypesListNode($statement); |
781 | 781 | break; |
782 | 782 | // In case of offset access type |
783 | 783 | case $child instanceof Node\Type\TypeNode: |
784 | | - if ($this->offsets === false) { |
| 784 | + if ($this->features->offsets === false) { |
785 | 785 | throw FeatureNotAllowedException::fromFeature('type offsets', $offset); |
786 | 786 | } |
787 | 787 |
|
|
0 commit comments