PreDec.php 636 B

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