Commit Graph

2 Commits

Author SHA1 Message Date
peptiderepo
ee4371d916 fix: expand $nonce_cb docblock to satisfy WordPress-Docs short-description sniff
The single-line /** @var ... */ on $nonce_cb was missing a short
description as its first content line (PHPCS WordPress-Docs sniff).
Expanded to a proper multi-line docblock with summary on the first line
and @var on a separate line.

Swept class-prv-settings-controller.php, class-prv-settings-page.php,
and class-prv-settings-renderer.php — no other instances found.

Agent-Session: pr-vision admin v0.2.0 docblocks
2026-06-14 07:39:50 +00:00
peptiderepo
56c276405a split: extract PRV_Settings_Controller from settings-page (300-line fix)
class-prv-settings-page.php was 346 lines — the only file over the
300-line cap. Extract the four POST handlers (handle_save,
handle_model_add, handle_model_update, handle_model_remove) into a
new PRV_Settings_Controller class (class-prv-settings-controller.php).

PRV_Settings_Page::register_hooks() instantiates the controller once,
passing a nonce-verification callback (bound to require_admin_nonce()).
All four admin_post_* hooks now delegate to the controller.

All phpcs:disable/enable WordPress.Security.NonceVerification.Missing
wrappers and sanitize_*/wp_unslash() calls traveled with the moved
handlers. PHPCS stays green.

Result:
  class-prv-settings-page.php       193 lines
  class-prv-settings-controller.php 213 lines
  All other production PHP files     ≤300 lines

Also: ARCHITECTURE.md file-tree updated; @see cross-refs added to
both class docblocks; CHANGELOG 0.2.0 CI section updated.

Version: 0.2.0
2026-06-14 07:34:12 +00:00