PHP Class Sstalle\php7cc\NodeVisitor\ForeachVisitor

Inheritance: extends AbstractNestedLoopVisitor
Afficher le fichier Open project: sstalle/php7cc

Protected Properties

Свойство Type Description
$arrayModifyingFunctions array
$arrayPointerModifyingFunctions array
$functionAnalyzer Sstalle\php7cc\NodeAnalyzer\FunctionAnalyzer

Méthodes publiques

Méthode Description
__construct ( FunctionAnalyzer $functionAnalyzer )
enterNode ( PhpParser\Node $node )

Méthodes protégées

Méthode Description
checkAddingToArrayInByReferenceForeach ( PhpParser\Node $node )
checkArrayModificationByFunctionInByReferenceForeach ( PhpParser\Node $node )
checkInternalArrayPointerAccessInByValueForeach ( PhpParser\Node $node )
checkNestedByReferenceForeach ( PhpParser\Node\Stmt\Foreach_ $foreach )
getForeachVariableName ( PhpParser\Node\Stmt\Foreach_ $foreach ) : PhpParser\Node\Expr | string | void
hasFunctionCallWithForeachArgument ( PhpParser\Node $node, array $functions, null | boolean $skippedByRefType = null ) : boolean
isTargetLoopNode ( PhpParser\Node $node )

Method Details

__construct() public méthode

public __construct ( FunctionAnalyzer $functionAnalyzer )
$functionAnalyzer Sstalle\php7cc\NodeAnalyzer\FunctionAnalyzer

checkAddingToArrayInByReferenceForeach() protected méthode

protected checkAddingToArrayInByReferenceForeach ( PhpParser\Node $node )
$node PhpParser\Node

checkArrayModificationByFunctionInByReferenceForeach() protected méthode

protected checkArrayModificationByFunctionInByReferenceForeach ( PhpParser\Node $node )
$node PhpParser\Node

checkInternalArrayPointerAccessInByValueForeach() protected méthode

protected checkInternalArrayPointerAccessInByValueForeach ( PhpParser\Node $node )
$node PhpParser\Node

checkNestedByReferenceForeach() protected méthode

protected checkNestedByReferenceForeach ( PhpParser\Node\Stmt\Foreach_ $foreach )
$foreach PhpParser\Node\Stmt\Foreach_

enterNode() public méthode

public enterNode ( PhpParser\Node $node )
$node PhpParser\Node

getForeachVariableName() protected méthode

protected getForeachVariableName ( PhpParser\Node\Stmt\Foreach_ $foreach ) : PhpParser\Node\Expr | string | void
$foreach PhpParser\Node\Stmt\Foreach_
Résultat PhpParser\Node\Expr | string | void

hasFunctionCallWithForeachArgument() protected méthode

protected hasFunctionCallWithForeachArgument ( PhpParser\Node $node, array $functions, null | boolean $skippedByRefType = null ) : boolean
$node PhpParser\Node
$functions array
$skippedByRefType null | boolean Reference type (by value/by reference) to skip
Résultat boolean

isTargetLoopNode() protected méthode

protected isTargetLoopNode ( PhpParser\Node $node )
$node PhpParser\Node

Property Details

$arrayModifyingFunctions protected_oe property

protected array $arrayModifyingFunctions
Résultat array

$arrayPointerModifyingFunctions protected_oe property

protected array $arrayPointerModifyingFunctions
Résultat array

$functionAnalyzer protected_oe property

protected FunctionAnalyzer,Sstalle\php7cc\NodeAnalyzer $functionAnalyzer
Résultat Sstalle\php7cc\NodeAnalyzer\FunctionAnalyzer