1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\Node; |
4: | |
5: | use PhpParser\Node\Stmt\Catch_; |
6: | use PhpParser\NodeAbstract; |
7: | use PHPStan\Type\Type; |
8: | |
9: | |
10: | class CatchWithUnthrownExceptionNode extends NodeAbstract implements VirtualNode |
11: | { |
12: | |
13: | public function __construct(private Catch_ $originalNode, private Type $caughtType, private Type $originalCaughtType) |
14: | { |
15: | parent::__construct($originalNode->getAttributes()); |
16: | } |
17: | |
18: | public function getOriginalNode(): Catch_ |
19: | { |
20: | return $this->originalNode; |
21: | } |
22: | |
23: | public function getCaughtType(): Type |
24: | { |
25: | return $this->caughtType; |
26: | } |
27: | |
28: | public function getOriginalCaughtType(): Type |
29: | { |
30: | return $this->originalCaughtType; |
31: | } |
32: | |
33: | public function getType(): string |
34: | { |
35: | return 'PHPStan_Node_CatchWithUnthrownExceptionNode'; |
36: | } |
37: | |
38: | |
39: | |
40: | |
41: | public function getSubNodeNames(): array |
42: | { |
43: | return []; |
44: | } |
45: | |
46: | } |
47: | |