PHPMD\Rule\UnusedLocalVariable::isUnusedForeachVariableAllowed PHP Method

isUnusedForeachVariableAllowed() private method

If it's not a foreach variable, it returns always false.
private isUnusedForeachVariableAllowed ( PHPMD\Node\ASTNode $variable ) : boolean
$variable PHPMD\Node\ASTNode The variable to check.
return boolean True if allowed, else false.
    private function isUnusedForeachVariableAllowed(ASTNode $variable)
    {
        $isForeachVariable = $this->isChildOf($variable, 'ForeachStatement');
        if (!$isForeachVariable) {
            return false;
        }
        return $this->getBooleanProperty('allow-unused-foreach-variables');
    }