1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Node;
4:
5: use Override;
6: use PhpParser\NodeAbstract;
7: use PHPStan\Analyser\StatementExitPoint;
8: use PHPStan\Turbo\ReferencedByTurboExtension;
9:
10: /**
11: * @api
12: */
13: #[ReferencedByTurboExtension(key: 'finallyExitPointsNode')]
14: final class FinallyExitPointsNode extends NodeAbstract implements VirtualNode
15: {
16:
17: /**
18: * @param StatementExitPoint[] $finallyExitPoints
19: * @param StatementExitPoint[] $tryCatchExitPoints
20: */
21: public function __construct(private array $finallyExitPoints, private array $tryCatchExitPoints)
22: {
23: parent::__construct([]);
24: }
25:
26: /**
27: * @return StatementExitPoint[]
28: */
29: public function getFinallyExitPoints(): array
30: {
31: return $this->finallyExitPoints;
32: }
33:
34: /**
35: * @return StatementExitPoint[]
36: */
37: public function getTryCatchExitPoints(): array
38: {
39: return $this->tryCatchExitPoints;
40: }
41:
42: #[Override]
43: public function getType(): string
44: {
45: return 'PHPStan_Node_FinallyExitPointsNode';
46: }
47:
48: /**
49: * @return string[]
50: */
51: #[Override]
52: public function getSubNodeNames(): array
53: {
54: return [];
55: }
56:
57: }
58: