Skip to content

Commit e823d7d

Browse files
committed
Right side of && is always true.
As found by PHPStan: Line 869 in src/Twig/TwigExtension.php Right side of && is always true. Which makes sense as var_dump(strtok(" ", " ")) -> bool(false) so we either get a false or would get the string on: var_dump(strtok(" 1", " ") -> str("1")
1 parent 304949f commit e823d7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/src/Twig/TwigExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ protected function parseSourceDiff(string $difftext): string
866866
{
867867
$line = strtok($difftext, "\n"); // first line
868868
$return = '';
869-
while ($line !== false && strlen($line) != 0) {
869+
while ($line !== false) {
870870
// Strip any additional DOS/MAC newline characters:
871871
$line = str_replace("\r", "", $line);
872872
$formdiffline = match (substr($line, 0, 1)) {

0 commit comments

Comments
 (0)