No Description

Error.php 748B

1234567891011121314151617181920212223242526272829303132
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. /**
  5. * Error node used during parsing with error recovery.
  6. *
  7. * An error node may be placed at a position where an expression is required, but an error occurred.
  8. * Error nodes will not be present if the parser is run in throwOnError mode (the default).
  9. */
  10. class Error extends Expr
  11. {
  12. /**
  13. * Constructs an error node.
  14. *
  15. * @param array $attributes Additional attributes
  16. */
  17. public function __construct(array $attributes = []) {
  18. $this->attributes = $attributes;
  19. }
  20. public function getSubNodeNames() : array {
  21. return [];
  22. }
  23. public function getType() : string {
  24. return 'Expr_Error';
  25. }
  26. }