| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace PhpParser\Node\Stmt; |
| 4: | |
| 5: | use PhpParser\Node; |
| 6: | |
| 7: | class Enum_ extends ClassLike { |
| 8: | |
| 9: | public ?Node $scalarType; |
| 10: | |
| 11: | public array $implements; |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | |
| 26: | |
| 27: | public function __construct($name, array $subNodes = [], array $attributes = []) { |
| 28: | $this->name = \is_string($name) ? new Node\Identifier($name) : $name; |
| 29: | $this->scalarType = $subNodes['scalarType'] ?? null; |
| 30: | $this->implements = $subNodes['implements'] ?? []; |
| 31: | $this->stmts = $subNodes['stmts'] ?? []; |
| 32: | $this->attrGroups = $subNodes['attrGroups'] ?? []; |
| 33: | |
| 34: | parent::__construct($attributes); |
| 35: | } |
| 36: | |
| 37: | public function getSubNodeNames(): array { |
| 38: | return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; |
| 39: | } |
| 40: | |
| 41: | public function getType(): string { |
| 42: | return 'Stmt_Enum'; |
| 43: | } |
| 44: | } |
| 45: | |