public function enterNode(Node $node)
{
parent::enterNode($node);
if ($this->isTargetLoopNode($node)) {
$this->checkNestedByReferenceForeach($node);
} elseif (!$this->getCurrentLoopStack()->isEmpty()) {
$this->checkInternalArrayPointerAccessInByValueForeach($node);
$this->checkArrayModificationByFunctionInByReferenceForeach($node);
$this->checkAddingToArrayInByReferenceForeach($node);
}
}