Cast.php 567 B

12345678910111213141516171819202122232425
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. abstract class Cast extends Expr {
  5. /** @var Expr Expression */
  6. public Expr $expr;
  7. /**
  8. * Constructs a cast node.
  9. *
  10. * @param Expr $expr Expression
  11. * @param array<string, mixed> $attributes Additional attributes
  12. */
  13. public function __construct(Expr $expr, array $attributes = []) {
  14. $this->attributes = $attributes;
  15. $this->expr = $expr;
  16. }
  17. public function getSubNodeNames(): array {
  18. return ['expr'];
  19. }
  20. }