Conversation
improve(COURIER-1006): Implement Strauss for dependency prefixing
linchpin-bot
left a comment
There was a problem hiding this comment.
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( | |||
There was a problem hiding this comment.
🚫 Error: Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$finder" (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound).
feat(COURIER-1006): Implement Prettier feat(COURIER-1006): Add precommit linting feat(COURIER-1006): Add phpstan including baseline
linchpin-bot
left a comment
There was a problem hiding this comment.
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
Powered by rtCamp's GitHub Actions Library
Posting will continue in further review(s)
| } | ||
|
|
||
| if ( ! class_exists( 'WP_CLI' ) ) { | ||
| class WP_CLI { |
There was a problem hiding this comment.
🚫 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 { |
There was a problem hiding this comment.
🚫 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 = [] ) {} |
There was a problem hiding this comment.
🚫 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 = [] ) {} |
There was a problem hiding this comment.
| if ( ! class_exists( 'WP_CLI' ) ) { | ||
| class WP_CLI { | ||
| public static function add_command( $name, $callable, $args = [] ) {} | ||
| public static function error( $message ) {} |
There was a problem hiding this comment.
🚫 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 ) {} |
There was a problem hiding this comment.
🚫 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 ) {} |
There was a problem hiding this comment.
🚫 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 ) {} |
There was a problem hiding this comment.
🚫 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 = '' ) {} |
There was a problem hiding this comment.
🚫 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 = '' ) {} |
There was a problem hiding this comment.
🚫 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).
linchpin-bot
left a comment
There was a problem hiding this comment.
Previous scan continued.
|
|
||
| // Mock Action Scheduler functions. | ||
| if ( ! function_exists( 'as_schedule_single_action' ) ) { | ||
| function as_schedule_single_action( $timestamp, $hook, $args = [], $group = '' ) {} |
There was a problem hiding this comment.
🚫 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 = '' ) {} |
There was a problem hiding this comment.
🚫 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 = '' ) {} |
There was a problem hiding this comment.
🚫 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 = '' ) {} |
There was a problem hiding this comment.
🚫 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 = '' ) {} |
There was a problem hiding this comment.
🚫 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 { |
There was a problem hiding this comment.
🚫 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 { |
There was a problem hiding this comment.
🚫 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 { |
There was a problem hiding this comment.
🚫 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 ) {} |
There was a problem hiding this comment.
🚫 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' ); | ||
| } |
There was a problem hiding this comment.
🚫 Error: Expected 1 blank line at end of file; 2 found (PSR2.Files.EndFileNewline.TooMany).
No description provided.