1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\Node; |
4: | |
5: | use PhpParser\Node; |
6: | use PhpParser\NodeAbstract; |
7: | use PHPStan\Reflection\ClassReflection; |
8: | use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection; |
9: | use PHPStan\Reflection\Php\PhpPropertyReflection; |
10: | |
11: | |
12: | |
13: | |
14: | final class InPropertyHookNode extends NodeAbstract implements VirtualNode |
15: | { |
16: | |
17: | public function __construct( |
18: | private ClassReflection $classReflection, |
19: | private PhpMethodFromParserNodeReflection $hookReflection, |
20: | private PhpPropertyReflection $propertyReflection, |
21: | private Node\PropertyHook $originalNode, |
22: | ) |
23: | { |
24: | parent::__construct($originalNode->getAttributes()); |
25: | } |
26: | |
27: | public function getClassReflection(): ClassReflection |
28: | { |
29: | return $this->classReflection; |
30: | } |
31: | |
32: | public function getHookReflection(): PhpMethodFromParserNodeReflection |
33: | { |
34: | return $this->hookReflection; |
35: | } |
36: | |
37: | public function getPropertyReflection(): PhpPropertyReflection |
38: | { |
39: | return $this->propertyReflection; |
40: | } |
41: | |
42: | public function getOriginalNode(): Node\PropertyHook |
43: | { |
44: | return $this->originalNode; |
45: | } |
46: | |
47: | public function getType(): string |
48: | { |
49: | return 'PHPStan_Node_InPropertyHookNode'; |
50: | } |
51: | |
52: | |
53: | |
54: | |
55: | public function getSubNodeNames(): array |
56: | { |
57: | return []; |
58: | } |
59: | |
60: | } |
61: | |