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: /** @api */
11: class ClassMethodsNode extends NodeAbstract implements VirtualNode
12: {
13:
14: /**
15: * @param ClassMethod[] $methods
16: * @param array<int, MethodCall> $methodCalls
17: */
18: public function __construct(private ClassLike $class, private array $methods, private array $methodCalls, private ClassReflection $classReflection)
19: {
20: parent::__construct($class->getAttributes());
21: }
22:
23: public function getClass(): ClassLike
24: {
25: return $this->class;
26: }
27:
28: /**
29: * @return ClassMethod[]
30: */
31: public function getMethods(): array
32: {
33: return $this->methods;
34: }
35:
36: /**
37: * @return array<int, MethodCall>
38: */
39: public function getMethodCalls(): array
40: {
41: return $this->methodCalls;
42: }
43:
44: public function getType(): string
45: {
46: return 'PHPStan_Node_ClassMethodsNode';
47: }
48:
49: /**
50: * @return string[]
51: */
52: public function getSubNodeNames(): array
53: {
54: return [];
55: }
56:
57: public function getClassReflection(): ClassReflection
58: {
59: return $this->classReflection;
60: }
61:
62: }
63: