From 3c3da203c8996618717b8c4cbf6667c09ed71e3f Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 29 Aug 2026 07:53:33 +0000 Subject: [PATCH] Fix PHPStan errors with WordPress 7.1 stubs wordpress-stubs v7.1.0 gives _get_cron_array() a precise return type, making the @var annotation in unschedule() wider than the inferred type. --- src/Cron_Event_Command.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Cron_Event_Command.php b/src/Cron_Event_Command.php index 7887c7a0..24b6cc5e 100644 --- a/src/Cron_Event_Command.php +++ b/src/Cron_Event_Command.php @@ -382,9 +382,6 @@ public function unschedule( $args, $assoc_args ) { if ( ! is_array( $cron ) ) { continue; } - /** - * @var array> $cron - */ if ( isset( $cron[ $hook ] ) ) { $event_count += count( $cron[ $hook ] ); }