From 1c14761ec7d3bf56a2850596639ffa766ca0b777 Mon Sep 17 00:00:00 2001
From: Erick Hitter <git-contrib@ethitter.com>
Date: Mon, 25 Sep 2017 13:16:15 -0700
Subject: [PATCH] First round of review feedback

---
 README.md                                     | 14 +++++++-------
 includes/{class-cli.php => class-command.php} |  8 ++++----
 languages/wp-cli-cron-control-offload.pot     |  4 ++--
 readme.txt                                    | 14 +++++++-------
 wp-cli-cron-control-offload.php               |  2 +-
 5 files changed, 21 insertions(+), 21 deletions(-)
 rename includes/{class-cli.php => class-command.php} (90%)

diff --git a/README.md b/README.md
index 344779d..7107cd1 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ Provides a WP-CLI command to schedule these events. A UI is under consideration.
 
 ### Where is command output captured? ###
 
-`error_log()` is used to store WP-CLI's output (`STDOUT`, `STDERR`, and the exit code), along with basic timing information and the command that was executed.
+The actions `wp_cli_cron_control_offload_run_success` and `wp_cli_cron_control_offload_run_error` are fired, allowing you to capture command output as your environment allows.
 
 ### Can this be used with commands that manipulate files? ###
 
@@ -51,8 +51,10 @@ Regardless of whether the constant or filter is used, either should provide an a
 
 ```
 array(
-	'post',
-	'site',
+	'cli',
+	'core',
+	'eval',
+	'eval-file',
 )
 ```
 
@@ -64,10 +66,8 @@ Regardless of whether the constant or filter is used, either should provide an a
 
 ```
 array(
-	'cli',
-	'core',
-	'eval',
-	'eval-file',
+	'post',
+	'site',
 )
 ```
 
diff --git a/includes/class-cli.php b/includes/class-command.php
similarity index 90%
rename from includes/class-cli.php
rename to includes/class-command.php
index 0557985..85b1295 100644
--- a/includes/class-cli.php
+++ b/includes/class-command.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Class CLI
+ * Class Command
  *
  * @package WP_CLI_Cron_Control_Offload
  */
@@ -8,7 +8,7 @@
 namespace Automattic\WP\WP_CLI_Cron_Control_Offload;
 
 if ( ! defined( 'WP_CLI' ) || ! \WP_CLI ) {
-	return false;
+	return;
 }
 
 use WP_CLI;
@@ -17,7 +17,7 @@ use WP_CLI_Command;
 /**
  * Offload WP-CLI commands to cron
  */
-class CLI extends WP_CLI_Command {
+class Command extends WP_CLI_Command {
 	/**
 	 * Create an event to run a given WP-CLI command
 	 *
@@ -50,4 +50,4 @@ class CLI extends WP_CLI_Command {
 	}
 }
 
-WP_CLI::add_command( CLI_NAMESPACE, __NAMESPACE__ . '\CLI' );
+WP_CLI::add_command( CLI_NAMESPACE, __NAMESPACE__ . '\Command' );
diff --git a/languages/wp-cli-cron-control-offload.pot b/languages/wp-cli-cron-control-offload.pot
index 2d42d5f..75ed636 100644
--- a/languages/wp-cli-cron-control-offload.pot
+++ b/languages/wp-cli-cron-control-offload.pot
@@ -5,7 +5,7 @@ msgstr ""
 "Project-Id-Version: WP-CLI Cron Control Offload 0.1.0\n"
 "Report-Msgid-Bugs-To: "
 "https://wordpress.org/support/plugin/wp-cli-cron-control-offload\n"
-"POT-Creation-Date: 2017-09-14 02:19:58+00:00\n"
+"POT-Creation-Date: 2017-09-25 20:14:10+00:00\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -25,7 +25,7 @@ msgstr ""
 "X-Poedit-Bookmarks: \n"
 "X-Textdomain-Support: yes\n"
 
-#: includes/class-cli.php:49
+#: includes/class-command.php:49
 #. translators: 1: Human time difference, 2. Timestamp in UTC
 msgid "Command scheduled for %1$s from now (%2$s)"
 msgstr ""
diff --git a/readme.txt b/readme.txt
index 7774669..c14b160 100644
--- a/readme.txt
+++ b/readme.txt
@@ -25,7 +25,7 @@ Provides a WP-CLI command to schedule these events. A UI is under consideration.
 
 = Where is command output captured? =
 
-`error_log()` is used to store WP-CLI's output (`STDOUT`, `STDERR`, and the exit code), along with basic timing information and the command that was executed.
+The actions `wp_cli_cron_control_offload_run_success` and `wp_cli_cron_control_offload_run_error` are fired, allowing you to capture command output as your environment allows.
 
 = Can this be used with commands that manipulate files? =
 
@@ -51,8 +51,10 @@ Regardless of whether the constant or filter is used, either should provide an a
 
 ```
 array(
-	'post',
-	'site',
+	'cli',
+	'core',
+	'eval',
+	'eval-file',
 )
 ```
 
@@ -64,10 +66,8 @@ Regardless of whether the constant or filter is used, either should provide an a
 
 ```
 array(
-	'cli',
-	'core',
-	'eval',
-	'eval-file',
+	'post',
+	'site',
 )
 ```
 
diff --git a/wp-cli-cron-control-offload.php b/wp-cli-cron-control-offload.php
index 929cd04..df9dafa 100644
--- a/wp-cli-cron-control-offload.php
+++ b/wp-cli-cron-control-offload.php
@@ -19,5 +19,5 @@ const CLI_NAMESPACE  = 'cli-cron-offload';
 const MESSAGE_PREFIX = 'WP-CLI via Cron';
 
 require_once __DIR__ . '/includes/functions.php';
-require_once __DIR__ . '/includes/class-cli.php';
+require_once __DIR__ . '/includes/class-command.php';
 require_once __DIR__ . '/includes/run.php';
-- 
GitLab