private function isUnusedForeachVariableAllowed(ASTNode $variable) { $isForeachVariable = $this->isChildOf($variable, 'ForeachStatement'); if (!$isForeachVariable) { return false; } return $this->getBooleanProperty('allow-unused-foreach-variables'); }