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