Commit 064e7379 authored by Erick Hitter's avatar Erick Hitter

PHPCS fixes

parent 5b27417f
......@@ -73,6 +73,7 @@ class Orchestrate_Runner extends \WP_CLI_Command {
$now = time();
if ( $timestamp > $now ) {
/* translators: 1: Event execution time in UTC, 2: Human time diff */
\WP_CLI::error( sprintf( __( 'Given timestamp is for %1$s UTC, %2$s from now. The event\'s existence was not confirmed, and no attempt was made to execute it.', 'automattic-cron-control' ), date_i18n( TIME_FORMAT, $timestamp ), human_time_diff( $now, $timestamp ) ) );
}
......
......@@ -22,15 +22,16 @@ class Orchestrate extends \WP_CLI_Command {
$status = \Automattic\WP\Cron_Control\Events::instance()->run_disabled();
switch ( $status ) {
case 0 :
case 0:
$status = __( 'Automatic execution is enabled', 'automattic-cron-control' );
break;
case 1 :
case 1:
$status = __( 'Automatic execution is disabled indefinitely', 'automattic-cron-control' );
break;
default :
default:
/* translators: 1: Human time diff, 2: Time execution is disabled until */
$status = sprintf( __( 'Automatic execution is disabled for %1$s (until %2$s UTC)', 'automattic-cron-control' ), human_time_diff( $status ), date_i18n( TIME_FORMAT, $status ) );
break;
}
......@@ -76,6 +77,7 @@ class Orchestrate extends \WP_CLI_Command {
$updated = \Automattic\WP\Cron_Control\Events::instance()->update_run_status( $disable_ts );
if ( $updated ) {
/* translators: 1: Human time diff, 2: Time execution is disabled until */
\WP_CLI::success( sprintf( __( 'Disabled for %1$s (until %2$s UTC)', 'automattic-cron-control' ), human_time_diff( $disable_ts ), date_i18n( TIME_FORMAT, $disable_ts ) ) );
return;
}
......
......@@ -45,6 +45,7 @@ class REST_API extends \WP_CLI_Command {
// Prepare items for display.
$events_for_display = $this->format_events( $queue_response['events'] );
$total_events_to_display = count( $events_for_display );
/* translators: 1: Event count */
\WP_CLI::log( sprintf( _n( 'Displaying %s event', 'Displaying %s events', $total_events_to_display, 'automattic-cron-control' ), number_format_i18n( $total_events_to_display ) ) );
// And reformat.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment