Commit 10e2c836 authored by Erick Hitter's avatar Erick Hitter
Browse files

PHPCS fixes

parent be1e471b
<?php
/**
* Execute cron via WP-CLI
*
* Not intended for human use, rather it powers the Go-based Runner. Use the `events` command instead.
*
* @package a8c_Cron_Control
*/
namespace Automattic\WP\Cron_Control\CLI;
......@@ -14,6 +21,8 @@ class Orchestrate_Runner extends \WP_CLI_Command {
* Not intended for human use, rather it powers the Go-based Runner. Use the `events list` command instead.
*
* @subcommand list-due-batch
* @param array $args Array of positional arguments.
* @param array $assoc_args Array of flags.
*/
public function list_due_now( $args, $assoc_args ) {
if ( 0 !== \Automattic\WP\Cron_Control\Events::instance()->run_disabled() ) {
......@@ -38,6 +47,8 @@ class Orchestrate_Runner extends \WP_CLI_Command {
*
* @subcommand run
* @synopsis --timestamp=<timestamp> --action=<action-hashed> --instance=<instance>
* @param array $args Array of positional arguments.
* @param array $assoc_args Array of flags.
*/
public function run_event( $args, $assoc_args ) {
if ( 0 !== \Automattic\WP\Cron_Control\Events::instance()->run_disabled() ) {
......@@ -56,7 +67,7 @@ class Orchestrate_Runner extends \WP_CLI_Command {
\WP_CLI::error( __( 'Invalid action', 'automattic-cron-control' ) );
}
if( ! is_string( $instance ) ) {
if ( ! is_string( $instance ) ) {
\WP_CLI::error( __( 'Invalid instance', 'automattic-cron-control' ) );
}
......@@ -65,10 +76,10 @@ class Orchestrate_Runner extends \WP_CLI_Command {
\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 ) ) );
}
// Prepare environment
// Prepare environment.
\Automattic\WP\Cron_Control\set_doing_cron();
// Run the event
// Run the event.
$run = \Automattic\WP\Cron_Control\run_event( $timestamp, $action, $instance );
if ( is_wp_error( $run ) ) {
......@@ -86,6 +97,8 @@ class Orchestrate_Runner extends \WP_CLI_Command {
* Not intended for human use, rather it powers the Go-based Runner. Use the `orchestrate manage-automatic-execution` command instead.
*
* @subcommand get-info
* @param array $args Array of positional arguments.
* @param array $assoc_args Array of flags.
*/
public function get_info( $args, $assoc_args ) {
$info = array(
......
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