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