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