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