From c59683b5ea7aa4274c02d2fb7534585815bf88be Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 15 Jun 2022 16:20:43 +0300 Subject: [PATCH] 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 --- bootstrap.php | 6 ++++-- modules/ppcp-button/src/Assets/SmartButton.php | 6 +++++- phpcs.xml.dist | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bootstrap.php b/bootstrap.php index a1f527a01..8d9cbef15 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -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( diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index f15b8c800..95d818741 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -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( '