Enhancement/commission restructure #2711
phpcs.yml
on: pull_request
Run PHPCS inspection
46s
Annotations
10 errors and 14 warnings
Run PHPCS inspection:
includes/Commission/Calculators/CategoryBasedCommissionCalculator.php#L12
PHP syntax error: syntax error, unexpected 'FixedCommissionCalculator' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
|
Run PHPCS inspection:
includes/Commission/Calculators/CategoryBasedCommissionCalculator.php#L12
Typed properties are not supported in PHP 7.3 or earlier
|
Run PHPCS inspection:
includes/Commission/Strategies/AbstractCommissionSourceStrategy.php#L13
Expected 0 spaces between parenthesis of function declaration; 2 found
|
Run PHPCS inspection:
includes/Commission/Strategies/AbstractCommissionSourceStrategy.php#L13
Nullable return types are not supported in PHP 7.0 or earlier.
|
Run PHPCS inspection:
includes/Commission/CommissionCalculatorFactory.php#L13
Nullable return types are not supported in PHP 7.0 or earlier.
|
Run PHPCS inspection:
includes/Commission/Calculators/CombineCommissionCalculator.php#L73
There must not be a space before the colon in a return type declaration
|
Run PHPCS inspection:
includes/Commission/Calculators/CombineCommissionCalculator.php#L78
There must not be a space before the colon in a return type declaration
|
Run PHPCS inspection:
includes/Commission/Calculators/PercentageCommissionCalculator.php#L49
There must not be a space before the colon in a return type declaration
|
Run PHPCS inspection:
includes/Commission/Calculators/PercentageCommissionCalculator.php#L54
There must not be a space before the colon in a return type declaration
|
Run PHPCS inspection:
includes/Commission/CommissionContext.php#L12
PHP syntax error: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST)
|
Run PHPCS inspection
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions/cache@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Run PHPCS inspection
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Run PHPCS inspection
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Run PHPCS inspection
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Run PHPCS inspection:
includes/Commission/Calculators/FlatCommissionCalculator.php#L34
Equals sign not aligned correctly; expected 1 space but found 3 spaces
|
Run PHPCS inspection:
includes/Admin/SetupWizard.php#L35
Found unknown capability "manage_woocommerce" in function call to current_user_can(). Please check the spelling of the capability. If this is a custom capability, please verify the capability is registered with WordPress via a call to WP_Role(s)->add_cap().
Custom capabilities can be made known to this sniff by setting the "custom_capabilities" property in the PHPCS ruleset.
|
Run PHPCS inspection:
includes/Admin/SetupWizard.php#L165
Found unknown capability "manage_woocommerce" in function call to add_submenu_page(). Please check the spelling of the capability. If this is a custom capability, please verify the capability is registered with WordPress via a call to WP_Role(s)->add_cap().
Custom capabilities can be made known to this sniff by setting the "custom_capabilities" property in the PHPCS ruleset.
|
Run PHPCS inspection:
includes/Admin/SetupWizard.php#L245
Found unknown capability "manage_woocommerce" in function call to current_user_can(). Please check the spelling of the capability. If this is a custom capability, please verify the capability is registered with WordPress via a call to WP_Role(s)->add_cap().
Custom capabilities can be made known to this sniff by setting the "custom_capabilities" property in the PHPCS ruleset.
|
Run PHPCS inspection:
includes/Admin/Settings.php#L93
Found unknown capability "manage_woocommerce" in function call to current_user_can(). Please check the spelling of the capability. If this is a custom capability, please verify the capability is registered with WordPress via a call to WP_Role(s)->add_cap().
Custom capabilities can be made known to this sniff by setting the "custom_capabilities" property in the PHPCS ruleset.
|
Run PHPCS inspection:
includes/Admin/Settings.php#L119
Found unknown capability "manage_woocommerce" in function call to current_user_can(). Please check the spelling of the capability. If this is a custom capability, please verify the capability is registered with WordPress via a call to WP_Role(s)->add_cap().
Custom capabilities can be made known to this sniff by setting the "custom_capabilities" property in the PHPCS ruleset.
|
Run PHPCS inspection:
includes/Admin/UserProfile.php#L56
Found unknown capability "manage_woocommerce" in function call to current_user_can(). Please check the spelling of the capability. If this is a custom capability, please verify the capability is registered with WordPress via a call to WP_Role(s)->add_cap().
Custom capabilities can be made known to this sniff by setting the "custom_capabilities" property in the PHPCS ruleset.
|
Run PHPCS inspection:
includes/Admin/UserProfile.php#L60
Found unknown capability "dokandar" in function call to user_can(). Please check the spelling of the capability. If this is a custom capability, please verify the capability is registered with WordPress via a call to WP_Role(s)->add_cap().
Custom capabilities can be made known to this sniff by setting the "custom_capabilities" property in the PHPCS ruleset.
|
Run PHPCS inspection:
includes/Admin/UserProfile.php#L519
Found unknown capability "manage_woocommerce" in function call to current_user_can(). Please check the spelling of the capability. If this is a custom capability, please verify the capability is registered with WordPress via a call to WP_Role(s)->add_cap().
Custom capabilities can be made known to this sniff by setting the "custom_capabilities" property in the PHPCS ruleset.
|
Run PHPCS inspection:
includes/Commission.php#L568
It is recommended not to use reserved keyword "callable" as function parameter name. Found: $callable
|