1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection;
4:
5: use PhpParser\Node;
6: use PHPStan\Analyser\Scope;
7:
8: /** @api */
9: interface ReflectionProvider
10: {
11:
12: /** @phpstan-assert-if-true =class-string $className */
13: public function hasClass(string $className): bool;
14:
15: public function getClass(string $className): ClassReflection;
16:
17: public function getClassName(string $className): string;
18:
19: public function supportsAnonymousClasses(): bool;
20:
21: public function getAnonymousClassReflection(
22: Node\Stmt\Class_ $classNode,
23: Scope $scope,
24: ): ClassReflection;
25:
26: public function hasFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): bool;
27:
28: public function getFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): FunctionReflection;
29:
30: public function resolveFunctionName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): ?string;
31:
32: public function hasConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): bool;
33:
34: public function getConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): GlobalConstantReflection;
35:
36: public function resolveConstantName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): ?string;
37:
38: }
39: