src/EmptyLineAboveDocblocksFixer.php
public function fix(\SplFileInfo $file, $content)
    {
        $tokens = Tokens::fromCode($content);

        for ($index = 2; $index < count($tokens); $index++) {
            $token = $tokens[$index];
            $previousToken = $tokens[$index - 1];
            $sndPreviousToken = $tokens[$index - 2];
            if ($sndPreviousToken->getContent() !== '{' &&
                substr($token->getContent(), 0, 3) === '/**' &&
                $previousToken->getLine() === $token->getLine() - 1
            ) {
                $previousToken->setContent(PHP_EOL . $previousToken->getContent());
            }
        }

        return $tokens->generateCode();
    }
public function fix(\SplFileInfo $file, $content)
    {
        $tokens = Tokens::fromCode($content);

        for ($index = 2; $index < count($tokens); $index++) {
            $token = $tokens[$index];
            $previousToken = $tokens[$index - 1];
            $sndPreviousToken = $tokens[$index - 2];
            if ($sndPreviousToken->getContent() !== '{' &&
                substr($token->getContent(), 0, 3) === '/**' &&
                $previousToken->getLine() === $token->getLine() - 1
            ) {
                $previousToken->setContent(PHP_EOL . $previousToken->getContent());
            }
        }

        return $tokens->generateCode();
    }
public function fix ( \ SplFileInfo $ file , $ content ) { $ tokens = Tokens :: fromCode ( $ content ) ; for ( $ index = 2 ; $ index < count ( $ tokens ) ; $ index ++ ) { $ token = $ tokens [ $ index ] ; $ previousToken = $ tokens [ $ index - 1 ] ; $ sndPreviousToken = $ tokens [ $ index - 2 ] ; if ( $ sndPreviousToken -> getContent ( ) !== '{' && substr ( $ token -> getContent ( ) , 0 , 3 ) === '/**' && $ previousToken -> getLine ( ) === $ token -> getLine ( ) - 1 ) { $ previousToken -> setContent ( PHP_EOL . $ previousToken -> getContent ( ) ) ; } } return $ tokens -> generateCode ( ) ; }
{@inheritdoc}
{