PHP Class Sstalle\php7cc\NodeVisitor\ForeachVisitor

Inheritance: extends AbstractNestedLoopVisitor
Datei anzeigen Open project: sstalle/php7cc

Protected Properties

Property Type Description
$arrayModifyingFunctions array
$arrayPointerModifyingFunctions array
$functionAnalyzer Sstalle\php7cc\NodeAnalyzer\FunctionAnalyzer

Public Methods

Method Description
__construct ( FunctionAnalyzer $functionAnalyzer )
enterNode ( PhpParser\Node $node )

Protected Methods

Method 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 method

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

checkAddingToArrayInByReferenceForeach() protected method

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

checkArrayModificationByFunctionInByReferenceForeach() protected method

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

checkInternalArrayPointerAccessInByValueForeach() protected method

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

checkNestedByReferenceForeach() protected method

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

enterNode() public method

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

getForeachVariableName() protected method

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

hasFunctionCallWithForeachArgument() protected method

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
return boolean

isTargetLoopNode() protected method

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

Property Details

$arrayModifyingFunctions protected_oe property

protected array $arrayModifyingFunctions
return array

$arrayPointerModifyingFunctions protected_oe property

protected array $arrayPointerModifyingFunctions
return array

$functionAnalyzer protected_oe property

protected FunctionAnalyzer,Sstalle\php7cc\NodeAnalyzer $functionAnalyzer
return Sstalle\php7cc\NodeAnalyzer\FunctionAnalyzer