diff --git a/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php b/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php
index c8eb3bf1..d252680f 100644
--- a/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php
+++ b/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php
@@ -91,12 +91,12 @@ public function run( $args, $assoc_args ) {
$batches_completed = 0;
$actions_completed = 0;
- $unlimited = $batches === 0;
- if ( is_callable( [ ActionScheduler::store(), 'set_claim_filter' ] ) ) {
+ $unlimited = 0 === $batches;
+ if ( is_callable( array( ActionScheduler::store(), 'set_claim_filter' ) ) ) {
$exclude_groups = $this->parse_comma_separated_string( $exclude_groups );
if ( ! empty( $exclude_groups ) ) {
- ActionScheduler::store()->set_claim_filter('exclude-groups', $exclude_groups );
+ ActionScheduler::store()->set_claim_filter( 'exclude-groups', $exclude_groups );
}
}
@@ -141,8 +141,6 @@ private function parse_comma_separated_string( $string ): array {
/**
* Print WP CLI message about how many actions are about to be processed.
*
- * @author Jeremy Pry
- *
* @param int $total Number of actions found.
*/
protected function print_total_actions( $total ) {
@@ -158,8 +156,6 @@ protected function print_total_actions( $total ) {
/**
* Print WP CLI message about how many batches of actions were processed.
*
- * @author Jeremy Pry
- *
* @param int $batches_completed Number of completed batches.
*/
protected function print_total_batches( $batches_completed ) {
@@ -175,11 +171,9 @@ protected function print_total_batches( $batches_completed ) {
/**
* Convert an exception into a WP CLI error.
*
- * @author Jeremy Pry
- *
* @param Exception $e The error object.
*
- * @throws \WP_CLI\ExitException
+ * @throws \WP_CLI\ExitException Under some conditions WP CLI may throw an exception.
*/
protected function print_error( Exception $e ) {
WP_CLI::error(
@@ -194,8 +188,6 @@ protected function print_error( Exception $e ) {
/**
* Print a success message with the number of completed actions.
*
- * @author Jeremy Pry
- *
* @param int $actions_completed Number of completed actions.
*/
protected function print_success( $actions_completed ) {
diff --git a/phpcs.xml b/phpcs.xml
index ccadfd3a..c2f46762 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -44,6 +44,10 @@
tests/*
+
+ classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php
+
+
classes/data-stores/ActionScheduler_wpPostStore.php
classes/ActionScheduler_wcSystemStatus.php