From 395fdee0dacc00b4c0755e848a6e1d166ebb4dc5 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Tue, 16 Jun 2026 15:33:02 +0000 Subject: [PATCH] fix(phpcs): suppress intentional warnings with phpcs:ignore annotations uninstall.php: direct wpdb->query() intentional in uninstall (no caching available); add phpcs:ignore DirectDatabaseQuery.DirectQuery and NoCaching. class-prc-rest-controller.php get_presets(): request param required by WP REST API callback contract; add phpcs:ignore UnusedFunctionParameter. Agent-Session: claude/adopt-ci-20260616 --- includes/api/class-prc-rest-controller.php | 2 +- uninstall.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/api/class-prc-rest-controller.php b/includes/api/class-prc-rest-controller.php index aa6c4d1..ec2fed0 100644 --- a/includes/api/class-prc-rest-controller.php +++ b/includes/api/class-prc-rest-controller.php @@ -81,7 +81,7 @@ class PRC_Rest_Controller { * @param \WP_REST_Request $request Request object. * @return \WP_REST_Response */ - public function get_presets( \WP_REST_Request $request ): \WP_REST_Response { + public function get_presets( \WP_REST_Request $request ): \WP_REST_Response { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found $provider = new PRC_Preset_Provider(); $presets = $provider->get_all_presets(); diff --git a/uninstall.php b/uninstall.php index ae90545..38449e8 100644 --- a/uninstall.php +++ b/uninstall.php @@ -19,7 +19,7 @@ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { global $wpdb; // Delete all prc_ prefixed options. -$wpdb->query( +$wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s", $wpdb->esc_like( 'prc_' ) . '%' @@ -27,7 +27,7 @@ $wpdb->query( ); // Delete all prc_ prefixed transients. -$wpdb->query( +$wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s OR option_name LIKE %s", $wpdb->esc_like( '_transient_prc_' ) . '%',