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:
@@ -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();
|
||||
|
||||
|
||||
@@ -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_' ) . '%',
|
||||
|
||||
Reference in New Issue
Block a user