PHP Class PHPStan\Analyser\NodeScopeResolver

Show file Open project: phpstan/phpstan Class Usage Examples

Public Methods

Method Description
__construct ( Broker $broker, PHPStan\Parser\Parser $parser, Standard $printer, FileTypeMapper $fileTypeMapper, TypeSpecifier $typeSpecifier, boolean $polluteScopeWithLoopInitialAssignments, boolean $polluteCatchScopeWithTryAssignments, boolean $defineVariablesWithoutDefaultBranch, array $earlyTerminatingMethodCalls )
__construct ( Broker $broker, Standard $printer, FileTypeMapper $fileTypeMapper, TypeSpecifier $typeSpecifier, boolean $polluteScopeWithLoopInitialAssignments, boolean $polluteCatchScopeWithTryAssignments, boolean $defineVariablesWithoutDefaultBranch, array $earlyTerminatingMethodCalls )
processNodes ( array $nodes, Scope $scope, Closure $nodeCallback, Scope $closureBindScope = null )

Private Methods

Method Description
assignVariable ( Scope $scope, PhpParser\Node $var, PHPStan\Type\Type $subNodeType = null ) : Scope
enterClassMethod ( Scope $scope, ClassMethod $classMethod ) : Scope
findParametersAcceptorInFunctionCall ( PhpParser\Node\Expr $functionCall, Scope $scope ) : null | PHPStan\Reflection\ParametersAcceptor
findParametersInFunctionCall ( PhpParser\Node\Expr $functionCall, Scope $scope ) : null | PHPStan\Reflection\ParameterReflection[]
hasEarlyTermination ( array $statements, Scope $scope ) : boolean
hasStatementEarlyTermination ( PhpParser\Node $statement, Scope $scope ) : boolean
lookForArrayDestructuringArray ( Scope $scope, PhpParser\Node $node ) : Scope
lookForAssigns ( Scope $scope, PhpParser\Node $node ) : Scope
lookForAssignsInBranches ( Scope $initialScope, array $statementsLists, boolean $isSwitchCase = false ) : Scope
lookForEnterVariableAssign ( Scope $scope, PhpParser\Node $node ) : Scope
lookForTypeSpecifications ( Scope $scope, PhpParser\Node $node ) : Scope
lookForTypeSpecificationsInEarlyTermination ( Scope $scope, PhpParser\Node $node ) : Scope
processNode ( PhpParser\Node $node, Scope $scope, Closure $nodeCallback )
processTraitUse ( PhpParser\Node\Stmt\TraitUse $node, Scope $classScope, Closure $nodeCallback )
updateScopeForVariableAssign ( Scope $scope, PhpParser\Node $node ) : Scope

Method Details

__construct() public method

public __construct ( Broker $broker, PHPStan\Parser\Parser $parser, Standard $printer, FileTypeMapper $fileTypeMapper, TypeSpecifier $typeSpecifier, boolean $polluteScopeWithLoopInitialAssignments, boolean $polluteCatchScopeWithTryAssignments, boolean $defineVariablesWithoutDefaultBranch, array $earlyTerminatingMethodCalls )
$broker PHPStan\Broker\Broker
$parser PHPStan\Parser\Parser
$printer PhpParser\PrettyPrinter\Standard
$fileTypeMapper PHPStan\Type\FileTypeMapper
$typeSpecifier TypeSpecifier
$polluteScopeWithLoopInitialAssignments boolean
$polluteCatchScopeWithTryAssignments boolean
$defineVariablesWithoutDefaultBranch boolean
$earlyTerminatingMethodCalls array

__construct() public method

public __construct ( Broker $broker, Standard $printer, FileTypeMapper $fileTypeMapper, TypeSpecifier $typeSpecifier, boolean $polluteScopeWithLoopInitialAssignments, boolean $polluteCatchScopeWithTryAssignments, boolean $defineVariablesWithoutDefaultBranch, array $earlyTerminatingMethodCalls )
$broker PHPStan\Broker\Broker
$printer PhpParser\PrettyPrinter\Standard
$fileTypeMapper PHPStan\Type\FileTypeMapper
$typeSpecifier TypeSpecifier
$polluteScopeWithLoopInitialAssignments boolean
$polluteCatchScopeWithTryAssignments boolean
$defineVariablesWithoutDefaultBranch boolean
$earlyTerminatingMethodCalls array

processNodes() public method

public processNodes ( array $nodes, Scope $scope, Closure $nodeCallback, Scope $closureBindScope = null )
$nodes array
$scope Scope
$nodeCallback Closure
$closureBindScope Scope