No Description

StaticVar.php 904B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node;
  4. use PhpParser\Node\Expr;
  5. class StaticVar extends Node\Stmt
  6. {
  7. /** @var Expr\Variable Variable */
  8. public $var;
  9. /** @var null|Node\Expr Default value */
  10. public $default;
  11. /**
  12. * Constructs a static variable node.
  13. *
  14. * @param Expr\Variable $var Name
  15. * @param null|Node\Expr $default Default value
  16. * @param array $attributes Additional attributes
  17. */
  18. public function __construct(
  19. Expr\Variable $var, Node\Expr $default = null, array $attributes = []
  20. ) {
  21. $this->attributes = $attributes;
  22. $this->var = $var;
  23. $this->default = $default;
  24. }
  25. public function getSubNodeNames() : array {
  26. return ['var', 'default'];
  27. }
  28. public function getType() : string {
  29. return 'Stmt_StaticVar';
  30. }
  31. }