PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer::fixWhitespace PHP Method

fixWhitespace() private method

Cleanup a whitespace token.
private fixWhitespace ( PhpCsFixer\Tokenizer\Token $token )
$token PhpCsFixer\Tokenizer\Token
    private function fixWhitespace(Token $token)
    {
        $content = $token->getContent();
        // if there is more than one new line in the whitespace, then we need to fix it
        if (substr_count($content, "\n") > 1) {
            // the final bit of the whitespace must be the next statement's indentation
            $lines = Utils::splitLines($content);
            $token->setContent($this->whitespacesConfig->getLineEnding() . end($lines));
        }
    }