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