File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1033,16 +1033,9 @@ function lime_shutdown()
10331033 unlink ($ result_file );
10341034
10351035 $ file_stats = &$ stats ['output ' ][0 ]['stats ' ];
1036-
1037- $ delta = 0 ;
10381036 $ this ->stats ['total ' ] += $ file_stats ['total ' ];
10391037
1040- if (!$ file_stats ['plan ' ])
1041- {
1042- $ file_stats ['plan ' ] = $ file_stats ['total ' ];
1043- }
1044-
1045- $ delta = $ file_stats ['plan ' ] - $ file_stats ['total ' ];
1038+ $ delta = $ this ->computePlanDeltaFromFileStats ($ file_stats );
10461039
10471040 if ($ return > 0 )
10481041 {
@@ -1187,6 +1180,15 @@ function lime_shutdown()
11871180 return $ this ->stats ['failed_files ' ] ? false : true ;
11881181 }
11891182
1183+ private function computePlanDeltaFromFileStats (array $ fileStats ): int
1184+ {
1185+ if ($ fileStats ['plan ' ]) {
1186+ return $ fileStats ['plan ' ] - $ fileStats ['total ' ];
1187+ } else {
1188+ return 0 ;
1189+ }
1190+ }
1191+
11901192 public function get_failed_files ()
11911193 {
11921194 return isset ($ this ->stats ['failed_files ' ]) ? $ this ->stats ['failed_files ' ] : array ();
You can’t perform that action at this time.
0 commit comments