Skip to content

Commit b93aa4b

Browse files
committed
Merge branch 'feature/generator-text-bugfix' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 5c82847 + 7a46d37 commit b93aa4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Generators/Text.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ protected function printCodeComparisonBlock(\DOMNode $node)
231231
}
232232

233233
echo '| ';
234-
echo $firstLineText.str_repeat(' ', (47 - strlen($firstLineText)));
234+
echo $firstLineText.str_repeat(' ', max(0, (47 - strlen($firstLineText))));
235235
echo '| ';
236-
echo $secondLineText.str_repeat(' ', (48 - strlen($secondLineText)));
236+
echo $secondLineText.str_repeat(' ', max(0, (48 - strlen($secondLineText))));
237237
echo '|'.PHP_EOL;
238238
}//end for
239239

0 commit comments

Comments
 (0)