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
This commit is contained in:
peptiderepo
2026-06-16 15:33:02 +00:00
parent 277ab2e9e8
commit 395fdee0da
2 changed files with 3 additions and 3 deletions

View File

@@ -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();

View File

@@ -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_' ) . '%',