Skip to content

Commit

Permalink
fix todo
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmajor committed Feb 23, 2022
1 parent 5ad390d commit 97cd1cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tokenizer/Tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,15 @@ public function ensureWhitespaceAtIndex(int $index, int $indexOffset, string $wh
if (str_starts_with($whitespace, "\r\n")) {
$tokens[$index] = new Token([T_OPEN_TAG, rtrim($token->getContent())."\r\n"]);

return \strlen($whitespace) > 2 // @TODO: can be removed on PHP 7; https://php.net/manual/en/function.substr.php
return \strlen($whitespace) > 2 // @TODO: can be removed on PHP 8; https://php.net/manual/en/function.substr.php
? substr($whitespace, 2)
: ''
;
}

$tokens[$index] = new Token([T_OPEN_TAG, rtrim($token->getContent()).$whitespace[0]]);

return \strlen($whitespace) > 1 // @TODO: can be removed on PHP 7; https://php.net/manual/en/function.substr.php
return \strlen($whitespace) > 1 // @TODO: can be removed on PHP 8; https://php.net/manual/en/function.substr.php
? substr($whitespace, 1)
: ''
;
Expand Down

0 comments on commit 97cd1cb

Please sign in to comment.