PhpCsFixer\Fixer\ReturnNotation\SimplifiedNullReturnFixer::shouldClearToken PHP Method

shouldClearToken() private method

If the token is a comment, or is whitespace that is immediately before a comment, then we'll leave it alone.
private shouldClearToken ( Tokens $tokens, integer $index ) : boolean
$tokens PhpCsFixer\Tokenizer\Tokens
$index integer
return boolean
    private function shouldClearToken(Tokens $tokens, $index)
    {
        $token = $tokens[$index];
        return !$token->isComment() && !($token->isWhitespace() && $tokens[$index + 1]->isComment());
    }