private function reduceIndentationLevel(int $indentationLevel, array $tokensInLine): int
    {
        $raisingIndentation = [
            TokenInterface::TYPE_BRACE_CLOSE,
        ];

        if ($this->indentConditions) {
            $raisingIndentation[] = TokenInterface::TYPE_CONDITION_END;
        }

        foreach ($tokensInLine as $token) {
            if (in_array($token->getType(), $raisingIndentation)) {
                if ($token->getType() === TokenInterface::TYPE_CONDITION_END) {
                    $this->insideCondition = false;
                }
                return $indentationLevel - 1;
            }
        }

        return $indentationLevel;
    }
private function reduceIndentationLevel(int $indentationLevel, array $tokensInLine): int
    {
        $raisingIndentation = [
            TokenInterface::TYPE_BRACE_CLOSE,
        ];

        if ($this->indentConditions) {
            $raisingIndentation[] = TokenInterface::TYPE_CONDITION_END;
        }

        foreach ($tokensInLine as $token) {
            if (in_array($token->getType(), $raisingIndentation)) {
                if ($token->getType() === TokenInterface::TYPE_CONDITION_END) {
                    $this->insideCondition = false;
                }
                return $indentationLevel - 1;
            }
        }

        return $indentationLevel;
    }
private function reduceIndentationLevel ( int $ indentationLevel , array $ tokensInLine ) : int { $ raisingIndentation = [ TokenInterface :: TYPE_BRACE_CLOSE , ] ; if ( $ this -> indentConditions ) { $ raisingIndentation [ ] = TokenInterface :: TYPE_CONDITION_END ; } foreach ( $ tokensInLine as $ token ) { if ( in_array ( $ token -> getType ( ) , $ raisingIndentation ) ) { if ( $ token -> getType ( ) === TokenInterface :: TYPE_CONDITION_END ) { $ this -> insideCondition = false ; } return $ indentationLevel - 1 ; } } return $ indentationLevel ; }
Check whether indentation should be reduced by one level, for current line.

Checks tokens in current line, and whether they will reduce the indentation by one.

@param int $indentationLevel The current indentation level
@param TokenInterface[] $tokensInLine
@return int The new indentation level
Check whether indentation should be reduced by one level for current line .