-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Description
Until $terminalWidth - $maxHeaderWidth - 5 in ErrorsConsoleStyle results in a number < 0, the output is more or less fine, sometimes with overflown header separators.
the three dumped numbers are
var_dump($terminalWidth);
var_dump($maxHeaderWidth);
var_dump($terminalWidth - $maxHeaderWidth - 5);
just before the definition of $wrap function:
When the subtraction gets bigger, the column gets upsizing itself right up from 1 character:
Ultimately, there are some cases when the wrap is not run even on content larger than the terminal.
The violations output seems fine in all cases.
I was able to solve this with a hacky && count($headers) > 1 in the condition on line 40:
if ($maxHeaderWidth === null || $length > $maxHeaderWidth && count($headers) > 1) {
I'll propose a PR if this "quickfix" is deemed plausible as it seems to me that the ConsoleStyle subclass doesn't take one-column tables in mind.
Reactions are currently unavailable


