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: | |
11: | |
12: | final class CatchWithUnthrownExceptionNode extends NodeAbstract implements VirtualNode |
13: | { |
14: | |
15: | public function __construct(private Catch_ $originalNode, private Type $caughtType, private Type $originalCaughtType) |
16: | { |
17: | parent::__construct($originalNode->getAttributes()); |
18: | } |
19: | |
20: | public function getOriginalNode(): Catch_ |
21: | { |
22: | return $this->originalNode; |
23: | } |
24: | |
25: | public function getCaughtType(): Type |
26: | { |
27: | return $this->caughtType; |
28: | } |
29: | |
30: | public function getOriginalCaughtType(): Type |
31: | { |
32: | return $this->originalCaughtType; |
33: | } |
34: | |
35: | public function getType(): string |
36: | { |
37: | return 'PHPStan_Node_CatchWithUnthrownExceptionNode'; |
38: | } |
39: | |
40: | |
41: | |
42: | |
43: | public function getSubNodeNames(): array |
44: | { |
45: | return []; |
46: | } |
47: | |
48: | } |
49: | |