From be2a05685cc34abd9cce4710de3a031cc2a79df8 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 13 Dec 2023 23:55:26 +0100 Subject: [PATCH] PHPCS: fix formatting of some ignore annotations --- admin/class-product-upsell-notice.php | 2 +- admin/class-yoast-notification-center.php | 8 +++--- admin/class-yoast-plugin-conflict.php | 2 +- .../import/plugins/class-import-aioseo-v4.php | 8 +++--- admin/metabox/class-metabox.php | 2 +- admin/taxonomy/class-taxonomy-columns.php | 8 +++--- admin/taxonomy/class-taxonomy.php | 4 +-- admin/views/tabs/tool/wpseo-export.php | 2 +- inc/class-addon-manager.php | 4 +-- inc/sitemaps/class-sitemaps.php | 2 +- .../container-registry.php | 4 +-- .../elementor-edit-conditional.php | 4 +-- src/helpers/crawl-cleanup-helper.php | 2 +- src/helpers/current-page-helper.php | 2 +- src/helpers/pagination-helper.php | 2 +- src/helpers/wpdb-helper.php | 2 +- .../admin/deactivated-premium-integration.php | 4 +-- .../application/current-page-trait.php | 2 +- .../indexable-cleanup-repository.php | 28 +++++++++---------- wp-seo-main.php | 2 +- 20 files changed, 47 insertions(+), 47 deletions(-) diff --git a/admin/class-product-upsell-notice.php b/admin/class-product-upsell-notice.php index 9f7327c5d62..e5149c179ab 100644 --- a/admin/class-product-upsell-notice.php +++ b/admin/class-product-upsell-notice.php @@ -70,7 +70,7 @@ public function set_upgrade_notice() { * @return void */ public function dismiss_notice_listener() { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are validating a nonce here. + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are validating a nonce here. if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'dismiss-5star-upsell' ) ) { return; } diff --git a/admin/class-yoast-notification-center.php b/admin/class-yoast-notification-center.php index f47bcb1ae08..fcbc734d097 100644 --- a/admin/class-yoast-notification-center.php +++ b/admin/class-yoast-notification-center.php @@ -534,9 +534,9 @@ public function get_sorted_notifications() { */ public function ajax_get_notifications() { $echo = false; - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form data. + // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form data. if ( isset( $_POST['version'] ) && is_string( $_POST['version'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are only comparing the variable in a condition. + // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are only comparing the variable in a condition. $echo = wp_unslash( $_POST['version'] ) === '2'; } @@ -703,7 +703,7 @@ private static function get_user_input( $key ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.NonceVerification.Missing -- Reason: We are not processing form information and only using this variable in a comparison. $request_method = isset( $_SERVER['REQUEST_METHOD'] ) && is_string( $_SERVER['REQUEST_METHOD'] ) ? strtoupper( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) : ''; // phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: This function does not sanitize variables. - // phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing -- Reason: This function does not verify a nonce. + // phpcs:disable WordPress.Security.NonceVerification.Recommended,WordPress.Security.NonceVerification.Missing -- Reason: This function does not verify a nonce. if ( $request_method === 'POST' ) { if ( isset( $_POST[ $key ] ) && is_string( $_POST[ $key ] ) ) { return wp_unslash( $_POST[ $key ] ); @@ -712,7 +712,7 @@ private static function get_user_input( $key ) { elseif ( isset( $_GET[ $key ] ) && is_string( $_GET[ $key ] ) ) { return wp_unslash( $_GET[ $key ] ); } - // phpcs:enable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized + // phpcs:enable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized return ''; } diff --git a/admin/class-yoast-plugin-conflict.php b/admin/class-yoast-plugin-conflict.php index 72740786dda..302cd495473 100644 --- a/admin/class-yoast-plugin-conflict.php +++ b/admin/class-yoast-plugin-conflict.php @@ -75,7 +75,7 @@ protected function __construct() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['action'] ) && is_string( $_GET['action'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information and only comparing the variable in a condition. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information and only comparing the variable in a condition. $action = wp_unslash( $_GET['action'] ); if ( $action === 'deactivate' ) { $this->remove_deactivated_plugin(); diff --git a/admin/import/plugins/class-import-aioseo-v4.php b/admin/import/plugins/class-import-aioseo-v4.php index 254c72d385a..122ce46d7cd 100644 --- a/admin/import/plugins/class-import-aioseo-v4.php +++ b/admin/import/plugins/class-import-aioseo-v4.php @@ -107,7 +107,7 @@ protected function meta_key_clone_replace( $replace_values ) { // Now, we'll also loop through the replace_vars array, which holds the mappings between the AiOSEO variables and the Yoast variables. // We'll replace all the AiOSEO variables in the temporary table with their Yoast equivalents. foreach ( $this->replace_vars as $aioseo_variable => $yoast_variable ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: We need this query and this is done at many other places as well, for example class-import-rankmath. + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Reason: We need this query and this is done at many other places as well, for example class-import-rankmath. $wpdb->query( $wpdb->prepare( 'UPDATE tmp_meta_table SET meta_value = REPLACE( meta_value, %s, %s )', @@ -184,7 +184,7 @@ protected function replace_custom_field_or_taxonomy_replace_vars( $unique_custom $aioseo_variable = "#{$aioseo_prefix}-{$unique_custom_field_or_taxonomy}"; $yoast_variable = "%%{$yoast_prefix}_{$unique_custom_field_or_taxonomy}%%"; - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->query( $wpdb->prepare( 'UPDATE tmp_meta_table SET meta_value = REPLACE( meta_value, %s, %s )', @@ -195,7 +195,7 @@ protected function replace_custom_field_or_taxonomy_replace_vars( $unique_custom } } - // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching /** * Retrieve all the meta values from the temporary meta table that contain @@ -216,7 +216,7 @@ protected function get_meta_values_with_custom_field_or_taxonomy( $wpdb, $aioseo ); } - // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching + // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching /** * Detects whether there is AIOSEO data to import by looking whether the AIOSEO data have been cleaned up. diff --git a/admin/metabox/class-metabox.php b/admin/metabox/class-metabox.php index 95aa56878e1..b40cd48d4fb 100644 --- a/admin/metabox/class-metabox.php +++ b/admin/metabox/class-metabox.php @@ -975,7 +975,7 @@ protected function get_metabox_post() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['post'] ) && is_string( $_GET['post'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, Sanitization happens in the validate_int function. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, Sanitization happens in the validate_int function. $post_id = (int) WPSEO_Utils::validate_int( wp_unslash( $_GET['post'] ) ); $this->post = get_post( $post_id ); diff --git a/admin/taxonomy/class-taxonomy-columns.php b/admin/taxonomy/class-taxonomy-columns.php index b71cbed9263..fda2f19ca97 100644 --- a/admin/taxonomy/class-taxonomy-columns.php +++ b/admin/taxonomy/class-taxonomy-columns.php @@ -125,7 +125,7 @@ public function parse_column( $content, $column_name, $term_id ) { * @return string|null The current taxonomy or null when it is not set. */ public function get_current_taxonomy() { - // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. + // phpcs:disable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( ! empty( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST' ) { if ( isset( $_POST['taxonomy'] ) && is_string( $_POST['taxonomy'] ) ) { return sanitize_text_field( wp_unslash( $_POST['taxonomy'] ) ); @@ -134,7 +134,7 @@ public function get_current_taxonomy() { elseif ( isset( $_GET['taxonomy'] ) && is_string( $_GET['taxonomy'] ) ) { return sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); } - // phpcs:enable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended + // phpcs:enable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended return null; } @@ -144,7 +144,7 @@ public function get_current_taxonomy() { * @return string|null */ private function get_taxonomy() { - // phpcs:disable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. + // phpcs:disable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( wp_doing_ajax() ) { if ( isset( $_POST['taxonomy'] ) && is_string( $_POST['taxonomy'] ) ) { return sanitize_text_field( wp_unslash( $_POST['taxonomy'] ) ); @@ -153,7 +153,7 @@ private function get_taxonomy() { elseif ( isset( $_GET['taxonomy'] ) && is_string( $_GET['taxonomy'] ) ) { return sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); } - // phpcs:enable WordPress.Security.NonceVerification.Missing, WordPress.Security.NonceVerification.Recommended + // phpcs:enable WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended return null; } diff --git a/admin/taxonomy/class-taxonomy.php b/admin/taxonomy/class-taxonomy.php index 38286b720b1..a0dc5737ca0 100644 --- a/admin/taxonomy/class-taxonomy.php +++ b/admin/taxonomy/class-taxonomy.php @@ -221,7 +221,7 @@ public function update_term( $term_id, $tt_id, $taxonomy ) { foreach ( WPSEO_Taxonomy_Meta::$defaults_per_term as $key => $default ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Reason: Nonce is already checked by WordPress before executing this action. if ( isset( $_POST[ $key ] ) && is_string( $_POST[ $key ] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: $data is getting sanitized later. + // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: $data is getting sanitized later. $data = wp_unslash( $_POST[ $key ] ); $new_meta_data[ $key ] = ( $key !== 'wpseo_canonical' ) ? WPSEO_Utils::sanitize_text_field( $data ) : WPSEO_Utils::sanitize_url( $data ); } @@ -401,7 +401,7 @@ private static function get_taxonomy() { private static function get_tag_id() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['tag_ID'] ) && is_string( $_GET['tag_ID'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are casting to an integer. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are casting to an integer. $tag_id = (int) wp_unslash( $_GET['tag_ID'] ); if ( $tag_id > 0 ) { return $tag_id; diff --git a/admin/views/tabs/tool/wpseo-export.php b/admin/views/tabs/tool/wpseo-export.php index 0ab607327cf..d0a4196145e 100644 --- a/admin/views/tabs/tool/wpseo-export.php +++ b/admin/views/tabs/tool/wpseo-export.php @@ -14,7 +14,7 @@ /* translators: %1$s expands to Yoast SEO */ $submit_button_value = sprintf( __( 'Export your %1$s settings', 'wordpress-seo' ), 'Yoast SEO' ); -// phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: The nonce will be verified in WPSEO_Export below, We are only strictly comparing with '1'. +// phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: The nonce will be verified in WPSEO_Export below, We are only strictly comparing with '1'. if ( isset( $_POST['do_export'] ) && wp_unslash( $_POST['do_export'] ) === '1' ) { $export = new WPSEO_Export(); $export->export(); diff --git a/inc/class-addon-manager.php b/inc/class-addon-manager.php index 85009e1f1cf..66a43c9bff6 100644 --- a/inc/class-addon-manager.php +++ b/inc/class-addon-manager.php @@ -421,7 +421,7 @@ public function expired_subscription_warning( $plugin_data ) { '', '' ) - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output is escaped above. + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Output is escaped above. . $sale_copy . ''; } @@ -730,7 +730,7 @@ protected function get_site_information_transient() { $current_page = null; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['page'] ) && is_string( $_GET['page'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing and thus no need to sanitize. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing and thus no need to sanitize. $current_page = wp_unslash( $_GET['page'] ); } diff --git a/inc/sitemaps/class-sitemaps.php b/inc/sitemaps/class-sitemaps.php index 41b42d16b75..a0ee8183ccb 100644 --- a/inc/sitemaps/class-sitemaps.php +++ b/inc/sitemaps/class-sitemaps.php @@ -535,7 +535,7 @@ public static function get_last_modified_gmt( $post_types, $return_all = false ) ORDER BY date DESC "; - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery -- They are prepared on the lines above and a direct query is required. + // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery -- They are prepared on the lines above and a direct query is required. foreach ( $wpdb->get_results( $sql ) as $obj ) { $post_type_dates[ $obj->post_type ] = $obj->date; } diff --git a/lib/dependency-injection/container-registry.php b/lib/dependency-injection/container-registry.php index 7a8a993fda8..bfcb3100838 100644 --- a/lib/dependency-injection/container-registry.php +++ b/lib/dependency-injection/container-registry.php @@ -29,7 +29,7 @@ public static function register( $name, ContainerInterface $container ) { self::$containers[ $name ] = $container; } - // phpcs:disable Squiz.Commenting.FunctionCommentThrowTag.WrongNumber -- PHPCS doesn't take into account exceptions thrown in called methods. + // phpcs:disable Squiz.Commenting.FunctionCommentThrowTag.WrongNumber -- PHPCS doesn't take into account exceptions thrown in called methods. /** * Get an instance from a specific container. @@ -53,7 +53,7 @@ public static function get( $name, $id, $invalid_behaviour = 1 ) { return self::$containers[ $name ]->get( $id, $invalid_behaviour ); } - // phpcs:enable Squiz.Commenting.FunctionCommentThrowTag.WrongNumber + // phpcs:enable Squiz.Commenting.FunctionCommentThrowTag.WrongNumber /** * Attempts to find a given service ID in all registered containers. diff --git a/src/conditionals/third-party/elementor-edit-conditional.php b/src/conditionals/third-party/elementor-edit-conditional.php index cdfc96c950a..c856c83bbe3 100644 --- a/src/conditionals/third-party/elementor-edit-conditional.php +++ b/src/conditionals/third-party/elementor-edit-conditional.php @@ -20,7 +20,7 @@ public function is_met() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['action'] ) && \is_string( $_GET['action'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing. $get_action = \wp_unslash( $_GET['action'] ); if ( $pagenow === 'post.php' && $get_action === 'elementor' ) { return true; @@ -29,7 +29,7 @@ public function is_met() { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Reason: We are not processing form information. if ( isset( $_POST['action'] ) && \is_string( $_POST['action'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing. + // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing. $post_action = \wp_unslash( $_POST['action'] ); return \wp_doing_ajax() && $post_action === 'wpseo_elementor_save'; } diff --git a/src/helpers/crawl-cleanup-helper.php b/src/helpers/crawl-cleanup-helper.php index 758ed19d086..73d0d96626d 100644 --- a/src/helpers/crawl-cleanup-helper.php +++ b/src/helpers/crawl-cleanup-helper.php @@ -155,7 +155,7 @@ public function singular_url() { } // Fix reply to comment links, whoever decided this should be a GET variable? - // phpcs:ignore WordPress.Security -- We know this is scary. + // phpcs:ignore WordPress.Security -- We know this is scary. if ( isset( $_SERVER['REQUEST_URI'] ) && \preg_match( '`(\?replytocom=[^&]+)`', \sanitize_text_field( $_SERVER['REQUEST_URI'] ), $matches ) ) { $proper_url .= \str_replace( '?replytocom=', '#comment-', $matches[0] ); } diff --git a/src/helpers/current-page-helper.php b/src/helpers/current-page-helper.php index 987523f2f2a..dfe6fb75e10 100644 --- a/src/helpers/current-page-helper.php +++ b/src/helpers/current-page-helper.php @@ -414,7 +414,7 @@ public function get_current_admin_page() { public function is_yoast_seo_page() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['page'] ) && \is_string( $_GET['page'] ) ) { - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only using the variable in the strpos function. + // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only using the variable in the strpos function. $current_page = \wp_unslash( $_GET['page'] ); return \strpos( $current_page, 'wpseo_' ) === 0; } diff --git a/src/helpers/pagination-helper.php b/src/helpers/pagination-helper.php index 19ef360dd3f..281e64669df 100644 --- a/src/helpers/pagination-helper.php +++ b/src/helpers/pagination-helper.php @@ -196,7 +196,7 @@ public function get_page_number_from_query_loop() { $key_query_loop = $this->get_key_query_loop(); if ( $key_query_loop ) { - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.NonceVerification.Recommended -- Validated in get_key_query_loop(). + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated,WordPress.Security.NonceVerification.Recommended -- Validated in get_key_query_loop(). $page_number = (int) $_GET[ $key_query_loop ]; if ( $page_number > 1 ) { return $page_number; diff --git a/src/helpers/wpdb-helper.php b/src/helpers/wpdb-helper.php index 4754aa9357b..feb0aa642c1 100644 --- a/src/helpers/wpdb-helper.php +++ b/src/helpers/wpdb-helper.php @@ -33,7 +33,7 @@ public function __construct( wpdb $wpdb ) { * @return bool Whether the table exists. */ public function table_exists( $table ) { - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: There is no unescaped user input. + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching,WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: There is no unescaped user input. $table_exists = $this->wpdb->get_var( "SHOW TABLES LIKE '{$table}'" ); if ( \is_wp_error( $table_exists ) || \is_null( $table_exists ) ) { return false; diff --git a/src/integrations/admin/deactivated-premium-integration.php b/src/integrations/admin/deactivated-premium-integration.php index 2e0b896c934..da18dab5db2 100644 --- a/src/integrations/admin/deactivated-premium-integration.php +++ b/src/integrations/admin/deactivated-premium-integration.php @@ -93,7 +93,7 @@ public function premium_deactivated_notice() { ) . '">', '' ); - // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped above. + // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped -- Output escaped above. echo new Notice_Presenter( /* translators: 1: Yoast SEO Premium */ \sprintf( \__( 'Activate %1$s!', 'wordpress-seo' ), 'Yoast SEO Premium' ), @@ -103,7 +103,7 @@ public function premium_deactivated_notice() { true, 'yoast-premium-deactivated-notice' ); - // phpcs:enable + // phpcs:enable // Enable permanently dismissing the notice. echo "