Skip to content

Commit 55df518

Browse files
authored
Merge pull request #126 from wp-cli/fix-phpstan
2 parents 7ece0f6 + 7e58c59 commit 55df518

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Cron_Event_Command.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,19 +186,19 @@ public function schedule( $args, $assoc_args ) {
186186
}
187187

188188
if ( ! empty( $recurrence ) ) {
189-
190189
$schedules = wp_get_schedules();
191190

192191
if ( ! isset( $schedules[ $recurrence ] ) ) {
193192
WP_CLI::error( sprintf( "'%s' is not a valid schedule name for recurrence.", $recurrence ) );
194193
}
195194

195+
// WordPress expects a list bug we knowingly pass an associative array.
196+
// @phpstan-ignore argument.type
196197
$event = wp_schedule_event( $timestamp, $recurrence, $hook, $assoc_args );
197-
198198
} else {
199-
199+
// Ditto.
200+
// @phpstan-ignore argument.type
200201
$event = wp_schedule_single_event( $timestamp, $hook, $assoc_args );
201-
202202
}
203203

204204
if ( false !== $event ) {

0 commit comments

Comments
 (0)