forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReflectionProvider.php
More file actions
42 lines (27 loc) · 1.23 KB
/
Copy pathReflectionProvider.php
File metadata and controls
42 lines (27 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php declare(strict_types = 1);
namespace PHPStan\Reflection;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
/**
* @api
* @api-do-not-implement
*/
interface ReflectionProvider
{
/** @phpstan-assert-if-true =class-string $className */
public function hasClass(string $className): bool;
public function getClass(string $className): ClassReflection;
public function getClassName(string $className): string;
public function getAnonymousClassReflection(
Node\Stmt\Class_ $classNode,
Scope $scope,
): ClassReflection;
/** @return list<string> */
public function getUniversalObjectCratesClasses(): array;
public function hasFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): bool;
public function getFunction(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): FunctionReflection;
public function resolveFunctionName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): ?string;
public function hasConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): bool;
public function getConstant(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): ConstantReflection;
public function resolveConstantName(Node\Name $nameNode, ?NamespaceAnswerer $namespaceAnswerer): ?string;
}