File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,6 @@ function check_status() {
122122 'status ' => $ scan_status ,
123123 'count ' => $ count_jobs ->publish ,
124124 'total ' => $ total_jobs ,
125- 'progress ' => 100 - ( ( $ count_jobs ->publish / $ total_jobs ) * 100 ),
126125 'activeJob ' => $ active_job ,
127126 'version ' => $ test_version ,
128127 'onlyActive ' => $ only_active ,
@@ -131,6 +130,8 @@ function check_status() {
131130 // If the scan is still running.
132131 if ( $ scan_status ) {
133132 $ to_encode ['results ' ] = '0 ' ;
133+ // Adding one because we don't remove an item until it's done processing.
134+ $ to_encode ['progress ' ] = 100 - ( ( ( $ count_jobs ->publish + 1 ) / $ total_jobs ) * 100 );
134135 } else {
135136 // Else return the results and clean up!
136137 $ scan_results = get_option ( 'wpephpcompat.scan_results ' );
You can’t perform that action at this time.
0 commit comments