@@ -153,13 +153,22 @@ class File
153153 protected $ warningCount = 0 ;
154154
155155 /**
156- * The original total number of errors and warnings (first run on a file).
156+ * The original total number of errors that can be fixed (first run on a file).
157157 *
158158 * {@internal This should be regarded as an immutable property.}
159159 *
160- * @var array<string, int>
160+ * @var integer
161+ */
162+ private $ fixableErrorCountFirstRun ;
163+
164+ /**
165+ * The original total number of warnings that can be fixed (first run on a file).
166+ *
167+ * {@internal This should be regarded as an immutable property.}
168+ *
169+ * @var integer
161170 */
162- private $ firstRunCounts ;
171+ private $ fixableWarningCountFirstRun ;
163172
164173 /**
165174 * The current total number of errors that can be fixed.
@@ -546,18 +555,14 @@ public function process()
546555 StatusWriter::write ('*** END SNIFF PROCESSING REPORT *** ' , 1 );
547556 }
548557
549- if (isset ($ this ->firstRunCounts ) === false ) {
550- $ this ->firstRunCounts = [
551- 'error ' => $ this ->errorCount ,
552- 'warning ' => $ this ->warningCount ,
553- 'fixableError ' => $ this ->fixableErrorCount ,
554- 'fixableWarning ' => $ this ->fixableWarningCount ,
555- ];
558+ if (isset ($ this ->fixableErrorCountFirstRun , $ this ->fixableWarningCountFirstRun ) === false ) {
559+ $ this ->fixableErrorCountFirstRun = $ this ->fixableErrorCount ;
560+ $ this ->fixableWarningCountFirstRun = $ this ->fixableWarningCount ;
556561 }
557562
558563 $ this ->fixedCount += $ this ->fixer ->getFixCount ();
559- $ this ->fixedErrorCount = ($ this ->firstRunCounts [ ' fixableError ' ] - $ this ->fixableErrorCount );
560- $ this ->fixedWarningCount = ($ this ->firstRunCounts [ ' fixableWarning ' ] - $ this ->fixableWarningCount );
564+ $ this ->fixedErrorCount = ($ this ->fixableErrorCountFirstRun - $ this ->fixableErrorCount );
565+ $ this ->fixedWarningCount = ($ this ->fixableWarningCountFirstRun - $ this ->fixableWarningCount );
561566
562567 }//end process()
563568
@@ -1212,22 +1217,6 @@ public function getFixedWarningCount()
12121217 }//end getFixedWarningCount()
12131218
12141219
1215- /**
1216- * Retrieve information about the first run.
1217- *
1218- * @param $type string
1219- *
1220- * @internal This method does not form part of any public API nor backwards compatibility guarantee.
1221- *
1222- * @return int
1223- */
1224- public function getFirstRunCount (string $ type ):int
1225- {
1226- return $ this ->firstRunCounts [$ type ];
1227-
1228- }//end getFirstRunCount()
1229-
1230-
12311220 /**
12321221 * Returns the list of ignored lines.
12331222 *
0 commit comments