1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Node;
4:
5: use PhpParser\Node;
6: use PHPStan\Reflection\ClassReflection;
7: use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
8:
9: /** @api */
10: class InClassMethodNode extends Node\Stmt implements VirtualNode
11: {
12:
13: public function __construct(
14: private ClassReflection $classReflection,
15: private PhpMethodFromParserNodeReflection $methodReflection,
16: private Node\Stmt\ClassMethod $originalNode,
17: )
18: {
19: parent::__construct($originalNode->getAttributes());
20: }
21:
22: public function getClassReflection(): ClassReflection
23: {
24: return $this->classReflection;
25: }
26:
27: public function getMethodReflection(): PhpMethodFromParserNodeReflection
28: {
29: return $this->methodReflection;
30: }
31:
32: public function getOriginalNode(): Node\Stmt\ClassMethod
33: {
34: return $this->originalNode;
35: }
36:
37: public function getType(): string
38: {
39: return 'PHPStan_Stmt_InClassMethodNode';
40: }
41:
42: /**
43: * @return string[]
44: */
45: public function getSubNodeNames(): array
46: {
47: return [];
48: }
49:
50: }
51: