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