1: | <?php declare(strict_types=1); |
2: | |
3: | namespace PhpParser\Node\Stmt\TraitUseAdaptation; |
4: | |
5: | use PhpParser\Node; |
6: | |
7: | class Alias extends Node\Stmt\TraitUseAdaptation { |
8: | |
9: | public ?int $newModifier; |
10: | |
11: | public ?Node\Identifier $newName; |
12: | |
13: | |
14: | |
15: | |
16: | |
17: | |
18: | |
19: | |
20: | |
21: | |
22: | public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { |
23: | $this->attributes = $attributes; |
24: | $this->trait = $trait; |
25: | $this->method = \is_string($method) ? new Node\Identifier($method) : $method; |
26: | $this->newModifier = $newModifier; |
27: | $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; |
28: | } |
29: | |
30: | public function getSubNodeNames(): array { |
31: | return ['trait', 'method', 'newModifier', 'newName']; |
32: | } |
33: | |
34: | public function getType(): string { |
35: | return 'Stmt_TraitUseAdaptation_Alias'; |
36: | } |
37: | } |
38: | |