1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Node;
4:
5: use PhpParser\Node\Stmt\ClassLike;
6: use PhpParser\NodeAbstract;
7: use PHPStan\Node\Method\MethodCall;
8: use PHPStan\Reflection\ClassReflection;
9:
10: /**
11: * @api
12: */
13: final class ClassMethodsNode extends NodeAbstract implements VirtualNode
14: {
15:
16: /**
17: * @param ClassMethod[] $methods
18: * @param array<int, MethodCall> $methodCalls
19: */
20: public function __construct(private ClassLike $class, private array $methods, private array $methodCalls, private ClassReflection $classReflection)
21: {
22: parent::__construct($class->getAttributes());
23: }
24:
25: public function getClass(): ClassLike
26: {
27: return $this->class;
28: }
29:
30: /**
31: * @return ClassMethod[]
32: */
33: public function getMethods(): array
34: {
35: return $this->methods;
36: }
37:
38: /**
39: * @return array<int, MethodCall>
40: */
41: public function getMethodCalls(): array
42: {
43: return $this->methodCalls;
44: }
45:
46: public function getType(): string
47: {
48: return 'PHPStan_Node_ClassMethodsNode';
49: }
50:
51: /**
52: * @return string[]
53: */
54: public function getSubNodeNames(): array
55: {
56: return [];
57: }
58:
59: public function getClassReflection(): ClassReflection
60: {
61: return $this->classReflection;
62: }
63:
64: }
65: