PostDec.php 633 B

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