From 02a635f72ce27a3b275f4a878785690af77e69d0 Mon Sep 17 00:00:00 2001
From: Marcus Quinn <6428977+marcusquinn@users.noreply.github.com>
Date: Mon, 16 Mar 2026 22:44:36 +0000
Subject: [PATCH] fix: address PR review feedback for class-admin.php (issue
#41) (#49)
- Fix mixed tab/space indentation on phpcs:disable/enable comment lines
- Exclude PHPMD Superglobals rule: WordPress plugins legitimately use
$_GET in testing branches with filter_input() for production; the
rule produces false positives in this pattern
- All other findings (wp_unslash, comment punctuation, else clause)
were already addressed in prior commits on main
---
includes/Admin/class-admin.php | 6 +++---
phpmd.xml | 2 ++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/includes/Admin/class-admin.php b/includes/Admin/class-admin.php
index 78e2fbe..0bfd8d8 100644
--- a/includes/Admin/class-admin.php
+++ b/includes/Admin/class-admin.php
@@ -46,8 +46,8 @@ class Admin {
*/
public function enqueue_admin_assets(): void {
- // @phpcs:disable WordPress.Security.NonceVerification.Recommended
- // @phpcs:disable WordPress.Security.NonceVerification.Missing
+ // @phpcs:disable WordPress.Security.NonceVerification.Recommended
+ // @phpcs:disable WordPress.Security.NonceVerification.Missing
// For production, use filter_input.
$page = '';
if ( defined( 'PHPUNIT_RUNNING' ) && PHPUNIT_RUNNING ) {
@@ -64,7 +64,7 @@ class Admin {
if ( ! $page || 'wp_plugin_starter_template_settings' !== $page ) {
return;
}
- // @phpcs:enable
+ // @phpcs:enable
// Get the plugin version.
$plugin_version = $this->core->get_plugin_version();
diff --git a/phpmd.xml b/phpmd.xml
index f95ccc5..6fd7b00 100644
--- a/phpmd.xml
+++ b/phpmd.xml
@@ -15,6 +15,8 @@
+
+