Fix phpcs

I guess the @since comments are not very critical for our hooks,
and anyway it should not be an error, finding the first version for every hook would take lots of time now.
not sure if there is a better way to suppress it in phpcs
This commit is contained in:
Alex P 2022-06-15 16:20:43 +03:00
parent 770f8e558b
commit c59683b5ea
3 changed files with 13 additions and 3 deletions

View file

@ -20,8 +20,10 @@ return function (
): ContainerInterface {
$modules = ( require "$root_dir/modules.php" )( $root_dir );
// Use this filter to add custom module or remove some of existing ones.
// Modules able to access container, add services and modify existing ones.
/**
* Use this filter to add custom module or remove some of existing ones.
* Modules able to access container, add services and modify existing ones.
*/
$modules = apply_filters( 'woocommerce_paypal_payments_modules', $modules );
$providers = array_map(

View file

@ -680,8 +680,12 @@ class SmartButton implements SmartButtonInterface {
return;
}
// phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
/**
* The WC filter returning the WC order button text.
* phpcs:disable WordPress.WP.I18n.TextDomainMismatch
*/
$label = 'checkout' === $this->context() ? apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ) : __( 'Pay for order', 'woocommerce' );
// phpcs:enable WordPress.WP.I18n.TextDomainMismatch
printf(
'<div id="%1$s" style="display:none;">

View file

@ -25,6 +25,10 @@
<exclude name="WordPress.PHP.DisallowShortTernary" />
</rule>
<rule ref="WooCommerce">
<exclude name="WooCommerce.Commenting.CommentHooks.MissingSinceComment" />
</rule>
<rule ref="Squiz.Commenting.FunctionComment">
<properties>
<property name="skipIfInheritdoc" value="true" />