@@ -167,14 +167,7 @@ public function schedule( $args, $assoc_args ) {
167167
168168 $ hook = $ args [0 ];
169169
170- /**
171- * @var string $next_run
172- */
173- $ next_run = Utils \get_flag_value ( $ args , 1 , 'now ' );
174-
175- /**
176- * @var string|false $recurrence
177- */
170+ $ next_run = Utils \get_flag_value ( $ args , 1 , 'now ' );
178171 $ recurrence = Utils \get_flag_value ( $ args , 2 , false );
179172
180173 if ( empty ( $ next_run ) ) {
@@ -464,8 +457,8 @@ protected static function get_cron_events( $is_due_now = false ) {
464457 * @return array|WP_Error An array of objects, or a WP_Error object is there are no events scheduled.
465458 */
466459 protected static function get_selected_cron_events ( $ args , $ assoc_args ) {
467- $ due_now = ( bool ) Utils \get_flag_value ( $ assoc_args , 'due-now ' );
468- $ all = ( bool ) Utils \get_flag_value ( $ assoc_args , 'all ' );
460+ $ due_now = Utils \get_flag_value ( $ assoc_args , 'due-now ' );
461+ $ all = Utils \get_flag_value ( $ assoc_args , 'all ' );
469462
470463 /**
471464 * @var string $exclude
@@ -571,6 +564,9 @@ private static function interval( $since ) {
571564 // x days, xx hours
572565 // so there's only two bits of calculation below:
573566
567+ $ i = 0 ;
568+ $ j = 0 ;
569+
574570 // step one: the first chunk
575571 for ( $ i = 0 , $ j = count ( $ chunks ); $ i < $ j ; $ i ++ ) {
576572 $ seconds = $ chunks [ $ i ][0 ];
0 commit comments