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: /**
10: * @api
11: */
12: final class InClassMethodNode extends Node\Stmt implements VirtualNode
13: {
14:
15: public function __construct(
16: private ClassReflection $classReflection,
17: private PhpMethodFromParserNodeReflection $methodReflection,
18: private Node\Stmt\ClassMethod $originalNode,
19: )
20: {
21: parent::__construct($originalNode->getAttributes());
22: }
23:
24: public function getClassReflection(): ClassReflection
25: {
26: return $this->classReflection;
27: }
28:
29: public function getMethodReflection(): PhpMethodFromParserNodeReflection
30: {
31: return $this->methodReflection;
32: }
33:
34: public function getOriginalNode(): Node\Stmt\ClassMethod
35: {
36: return $this->originalNode;
37: }
38:
39: public function getType(): string
40: {
41: return 'PHPStan_Stmt_InClassMethodNode';
42: }
43:
44: /**
45: * @return string[]
46: */
47: public function getSubNodeNames(): array
48: {
49: return [];
50: }
51:
52: }
53: