PHPMD\Rule\UnusedLocalVariable::collectVariable PHP Method

collectVariable() private method

Stores the given variable node in an internal list of found variables.
private collectVariable ( PHPMD\Node\ASTNode $node ) : void
$node PHPMD\Node\ASTNode
return void
    private function collectVariable(ASTNode $node)
    {
        if (!isset($this->images[$node->getImage()])) {
            $this->images[$node->getImage()] = array();
        }
        $this->images[$node->getImage()][] = $node;
    }