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
This commit is contained in:
2026-03-16 22:44:36 +00:00
committed by GitHub
parent 6625e8ca4a
commit 02a635f72c
2 changed files with 5 additions and 3 deletions

View File

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