We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec38580 commit 92dd311Copy full SHA for 92dd311
CodeSniffer/Reports/Full.php
@@ -78,14 +78,7 @@ public function generateFileReport(
78
echo str_repeat('-', $width).PHP_EOL;
79
80
// Work out the max line number for formatting.
81
- $maxLine = 0;
82
- foreach ($report['messages'] as $line => $lineErrors) {
83
- if ($line > $maxLine) {
84
- $maxLine = $line;
85
- }
86
87
-
88
- $maxLineLength = strlen($maxLine);
+ $maxLineLength = max(array_map('strlen', array_keys($report['messages'])));
89
90
// The length of the word ERROR or WARNING; used for padding.
91
if ($report['warnings'] > 0) {
0 commit comments