No Description

Variable.php 640B

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