src/Fixer/ControlStructure/NoBreakCommentFixer.php
private function getIndentAt(Tokens $tokens, $position)
    {
        while (true) {
            $position = $tokens->getPrevTokenOfKind($position, [[T_WHITESPACE]]);

            if (null === $position) {
                break;
            }

            $content = $tokens[$position]->getContent();

            $prevToken = $tokens[$position - 1];
            if ($prevToken->isGivenKind(T_OPEN_TAG) && Preg::match('/\R$/', $prevToken->getContent())) {
                $content = $this->whitespacesConfig->getLineEnding().$content;
            }

            if (Preg::match('/\R([ \t]*)$/', $content, $matches)) {
                return $matches[1];
            }
        }

        return '';
    }
private function getIndentAt(Tokens $tokens, $position)
    {
        while (true) {
            $position = $tokens->getPrevTokenOfKind($position, [[T_WHITESPACE]]);

            if (null === $position) {
                break;
            }

            $content = $tokens[$position]->getContent();

            $prevToken = $tokens[$position - 1];
            if ($prevToken->isGivenKind(T_OPEN_TAG) && Preg::match('/\R$/', $prevToken->getContent())) {
                $content = $this->whitespacesConfig->getLineEnding().$content;
            }

            if (Preg::match('/\R([ \t]*)$/', $content, $matches)) {
                return $matches[1];
            }
        }

        return '';
    }
@param Tokens $tokens
@param int    $position

@return string