From 5bb5f83638c7ea8b69408f0ca2d734bdeb738e11 Mon Sep 17 00:00:00 2001 From: Greg Sherwood Date: Mon, 10 Feb 2020 09:42:02 +1100 Subject: [PATCH] Changelog for #2853 --- package.xml | 2 ++ src/Reports/Info.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.xml b/package.xml index da7c2d26a9..f5f4a42441 100644 --- a/package.xml +++ b/package.xml @@ -28,6 +28,8 @@ http://pear.php.net/dtd/package-2.0.xsd"> - Fixed bug #2848 : PSR12.Files.FileHeader false positive for file with mixed PHP and HTML and no file header - Fixed bug #2849 : Generic.WhiteSpace.ScopeIndent false positive with arrow function inside array + - Fixed bug #2853 : Undefined variable error when using Info report + -- Thanks to Juliette Reinders Folmer for the patch diff --git a/src/Reports/Info.php b/src/Reports/Info.php index 5028d37199..3181bcc546 100644 --- a/src/Reports/Info.php +++ b/src/Reports/Info.php @@ -116,9 +116,9 @@ public function generate( // Length of the total string, plus however many // thousands separators there are. - $countWidth = strlen($totalCount); - $nrOfThousandSeps = floor($countWidth / 3); - $countWidth += $nrOfThousandSeps; + $countWidth = strlen($totalCount); + $thousandSeparatorCount = floor($countWidth / 3); + $countWidth += $thousandSeparatorCount; // Account for 'total' line. $valueWidth = max(5, $valueWidth);