| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace PhpParser\Node; |
| 4: | |
| 5: | use PhpParser\Node; |
| 6: | use PhpParser\NodeAbstract; |
| 7: | |
| 8: | class StaticVar extends NodeAbstract { |
| 9: | |
| 10: | public Expr\Variable $var; |
| 11: | |
| 12: | public ?Expr $default; |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | public function __construct( |
| 22: | Expr\Variable $var, ?Node\Expr $default = null, array $attributes = [] |
| 23: | ) { |
| 24: | $this->attributes = $attributes; |
| 25: | $this->var = $var; |
| 26: | $this->default = $default; |
| 27: | } |
| 28: | |
| 29: | public function getSubNodeNames(): array { |
| 30: | return ['var', 'default']; |
| 31: | } |
| 32: | |
| 33: | public function getType(): string { |
| 34: | return 'StaticVar'; |
| 35: | } |
| 36: | } |
| 37: | |
| 38: | |
| 39: | class_alias(StaticVar::class, Stmt\StaticVar::class); |
| 40: | |