| Classes | |
|---|---|
| ArgumentsNormalizer | |
| EndStatementResult | |
| Error | |
| ImpurePoint | |
| InternalError | |
| MutatingScope | |
| NameScope | |
| NodeCallbackScope | |
| NodeScopeResolver | |
| OutOfClassScope | |
| ScopeContext | |
| ScopeFactory | |
| SpecifiedTypes | |
| StatementContext | Object of this class is one of the parameters of |
| StatementExitPoint | |
| StatementResult | |
| ThrowPoint | |
| TypeSpecifier | |
| TypeSpecifierContext | |
| Interfaces | |
| CollectedDataEmitter | The interface CollectedDataEmitter can be typehinted in 2nd parameter of Rule::processNode(): ```php public function processNode(Node $node, Scope&CollectedDataEmitter $scope): array
|
| DeclarationDependencyTracker | DependencyTracker for extensions that get no Scope because they describe a class rather than analyse code - class reflection extensions adding magic methods and properties, for example. Inject it into the extension's constructor. What PHPStan learns about a class this way is remembered and reused by every file analysed after it, so it's the class that depends on what the extension read, not the file being analysed: each method declares the dependency of $classReflection. When it changes, every file depending on the class - referencing it, calling its methods, reading its properties - is analysed again. |
| DependencyTracker | The interface DependencyTracker can be typehinted in 2nd parameter of Rule::processNode() and Collector::processNode(), and in the Scope parameter of dynamic return type extensions, dynamic throw type extensions, expression type resolver extensions, parameter out type extensions, parameter closure type extensions, parameter closure this extensions and type-specifying extensions: ```php /**
|
| IgnoreErrorExtension | This is the extension interface to implement if you want to ignore errors
based on the node and scope. To register it in the configuration file use the
|
| NodeCallbackInvoker | The interface NodeCallbackInvoker can be typehinted in 2nd parameter of Rule::processNode(): |
| Scope | Represents the state of the analyser at a specific position in the AST. The Scope tracks everything PHPStan knows at a given point in code: variable types, the current class/function/method context, whether strict_types is enabled, and more. It is the primary interface through which rules and extensions query information about the analysed code. The Scope is passed as a parameter to:
|
| TypeSpecifierAwareExtension | |
| Exceptions | |
| UndefinedVariableException | |
| Namespaces | |
| PHPStan\Analyser\ResultCache | |