Skip to content

Issue/courier 1006#384

Merged
aaronware merged 11 commits intomainfrom
issue/COURIER-1006
Jul 18, 2025
Merged

Issue/courier 1006#384
aaronware merged 11 commits intomainfrom
issue/COURIER-1006

Conversation

@aaronware
Copy link
Collaborator

No description provided.

Copy link
Contributor

@linchpin-bot linchpin-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code analysis identified issues

action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.

phpcs scanning turned up:

🚫 6 errors


Powered by rtCamp's GitHub Actions Library

@@ -13,8 +13,6 @@
$finder = PhpCsFixer\Finder::create()->in(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$finder" (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound).

Copy link
Contributor

@linchpin-bot linchpin-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code analysis identified issues

action-phpcs-code-review has identified potential problems in this pull request during automated scanning. We recommend reviewing the issues noted and that they are resolved.

phpcs scanning turned up:

🚫 19 errors

⚠️ 1 warning


Powered by rtCamp's GitHub Actions Library

Posting will continue in further review(s)

}

if ( ! class_exists( 'WP_CLI' ) ) {
class WP_CLI {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Classes declared by a theme/plugin should start with the theme/plugin prefix. Found: "WP_CLI" (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound).

}

if ( ! class_exists( 'WP_CLI' ) ) {
class WP_CLI {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for class WP_CLI (Squiz.Commenting.ClassComment.Missing).


if ( ! class_exists( 'WP_CLI' ) ) {
class WP_CLI {
public static function add_command( $name, $callable, $args = [] ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function add_command() (Squiz.Commenting.FunctionComment.Missing).


if ( ! class_exists( 'WP_CLI' ) ) {
class WP_CLI {
public static function add_command( $name, $callable, $args = [] ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: It is recommended not to use reserved keyword "callable" as function parameter name. Found: $callable (Universal.NamingConventions.NoReservedKeywordParameterNames.callableFound).

if ( ! class_exists( 'WP_CLI' ) ) {
class WP_CLI {
public static function add_command( $name, $callable, $args = [] ) {}
public static function error( $message ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function error() (Squiz.Commenting.FunctionComment.Missing).

class WP_CLI {
public static function add_command( $name, $callable, $args = [] ) {}
public static function error( $message ) {}
public static function success( $message ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function success() (Squiz.Commenting.FunctionComment.Missing).

public static function add_command( $name, $callable, $args = [] ) {}
public static function error( $message ) {}
public static function success( $message ) {}
public static function warning( $message ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function warning() (Squiz.Commenting.FunctionComment.Missing).

public static function error( $message ) {}
public static function success( $message ) {}
public static function warning( $message ) {}
public static function log( $message ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function log() (Squiz.Commenting.FunctionComment.Missing).


// Mock Action Scheduler functions.
if ( ! function_exists( 'as_schedule_single_action' ) ) {
function as_schedule_single_action( $timestamp, $hook, $args = [], $group = '' ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: A file should either contain function declarations or OO structure declarations, but not both. Found 3 function declaration(s) and 2 OO structure declaration(s). The first function declaration was found on line 35; the first OO declaration was found on line 24 (Universal.Files.SeparateFunctionsFromOO.Mixed).


// Mock Action Scheduler functions.
if ( ! function_exists( 'as_schedule_single_action' ) ) {
function as_schedule_single_action( $timestamp, $hook, $args = [], $group = '' ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "as_schedule_single_action" (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound).

Copy link
Contributor

@linchpin-bot linchpin-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous scan continued.


// Mock Action Scheduler functions.
if ( ! function_exists( 'as_schedule_single_action' ) ) {
function as_schedule_single_action( $timestamp, $hook, $args = [], $group = '' ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function as_schedule_single_action() (Squiz.Commenting.FunctionComment.Missing).

}

if ( ! function_exists( 'as_next_scheduled_action' ) ) {
function as_next_scheduled_action( $hook, $args = [], $group = '' ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "as_next_scheduled_action" (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound).

}

if ( ! function_exists( 'as_next_scheduled_action' ) ) {
function as_next_scheduled_action( $hook, $args = [], $group = '' ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function as_next_scheduled_action() (Squiz.Commenting.FunctionComment.Missing).

}

if ( ! function_exists( 'as_schedule_recurring_action' ) ) {
function as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = [], $group = '' ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "as_schedule_recurring_action" (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound).

}

if ( ! function_exists( 'as_schedule_recurring_action' ) ) {
function as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = [], $group = '' ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function as_schedule_recurring_action() (Squiz.Commenting.FunctionComment.Missing).


// Mock WP_CLI\Utils class.
if ( ! class_exists( 'WP_CLI\Utils' ) ) {
class WP_CLI_Utils {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Only one object structure is allowed in a file (Generic.Files.OneObjectStructurePerFile.MultipleFound).


// Mock WP_CLI\Utils class.
if ( ! class_exists( 'WP_CLI\Utils' ) ) {
class WP_CLI_Utils {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Classes declared by a theme/plugin should start with the theme/plugin prefix. Found: "WP_CLI_Utils" (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound).


// Mock WP_CLI\Utils class.
if ( ! class_exists( 'WP_CLI\Utils' ) ) {
class WP_CLI_Utils {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for class WP_CLI_Utils (Squiz.Commenting.ClassComment.Missing).

// Mock WP_CLI\Utils class.
if ( ! class_exists( 'WP_CLI\Utils' ) ) {
class WP_CLI_Utils {
public static function format_items( $format, $items, $fields ) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Missing doc comment for function format_items() (Squiz.Commenting.FunctionComment.Missing).

}
// Alias for the namespaced version.
class_alias( 'WP_CLI_Utils', 'WP_CLI\Utils' );
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: Expected 1 blank line at end of file; 2 found (PSR2.Files.EndFileNewline.TooMany).

@aaronware aaronware merged commit c1a35ae into main Jul 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants