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