fix: proper standalone file docblocks + Yoda/unslash/escaping + 300-line compliance

- Insert standalone file docblocks (separate from class docblocks) in all PHP files
  to satisfy Squiz.Commenting.FileComment.Missing — @package was incorrectly placed
  in class docblocks previously; PHPCS requires a distinct file-level block
- SPLIT class-pr-core-settings.php (was 340 lines after docblock expansion):
  class-pr-core-settings.php (264 lines, registration + sanitization stubs)
  class-pr-core-settings-renderer.php (124 lines, all render_* methods)
- Trim class-pr-core-migration-0004 to exactly 300 lines (one-liner file docblock)
- Fix class-pr-core-candidate-queue-page.php:
  Yoda conditions: null !== c->dose_min / null !== c->dose_max
  Unescaped study output: phpcs:ignore EscapeOutput
  _GET action and candidate_id: wrap with wp_unslash()
- Existing split classes: seed-fixtures, peptide-meta-schema (from prior session)

Agent-Session: claude-adopt-ci-20260616
This commit is contained in:
peptiderepo
2026-06-16 15:59:00 +00:00
parent a922824a2b
commit da583b7f60
51 changed files with 306 additions and 54 deletions

View File

@@ -1,6 +1,12 @@
<?php
declare(strict_types=1);
/**
* Provides shortcode [pr_disclaimer surface="dosing"] and function
*
* @package Peptide_Repo_Core
*/
/**
* Shared disclaimer component for all peptide data surfaces.
*
@@ -14,7 +20,6 @@ declare(strict_types=1);
* not once per consumer plugin.
*
* @see ARCHITECTURE.md — Section 2.8 Shared Disclaimer Component.
* @package Peptide_Repo_Core
*/
class PR_Core_Disclaimer {

View File

@@ -1,6 +1,12 @@
<?php
declare(strict_types=1);
/**
* Assembles a Drug (+ MolecularEntity) schema node from peptide DTO
*
* @package Peptide_Repo_Core
*/
/**
* Builds the schema.org Drug graph piece for a peptide page.
*
@@ -14,7 +20,6 @@ declare(strict_types=1);
*
* @see frontend/class-pr-core-jsonld.php — Orchestrator that calls this builder.
* @see ARCHITECTURE.md — §2.7 JSON-LD output.
* @package Peptide_Repo_Core
*/
class PR_Core_Jsonld_Drug {

View File

@@ -1,6 +1,12 @@
<?php
declare(strict_types=1);
/**
* Reads _pr_faq_items post-meta (JSON array of {question, answer} objects)
*
* @package Peptide_Repo_Core
*/
/**
* Builds the schema.org FAQPage graph piece for a peptide page.
*
@@ -14,7 +20,6 @@ declare(strict_types=1);
* @see frontend/class-pr-core-jsonld.php — Orchestrator that calls this builder.
* @see cpt/class-pr-core-schema-sanitizers.php — sanitize_faq_items() used on save.
* @see ARCHITECTURE.md — §2.7 JSON-LD output.
* @package Peptide_Repo_Core
*/
class PR_Core_Jsonld_Faq {

View File

@@ -1,6 +1,12 @@
<?php
declare(strict_types=1);
/**
* Hooks into Yoast's wpseo_schema_webpage_type filter to retype the page
*
* @package Peptide_Repo_Core
*/
/**
* Enriches Yoast's WebPage node to MedicalWebPage for peptide single pages.
*
@@ -13,7 +19,6 @@ declare(strict_types=1);
*
* @see frontend/class-pr-core-jsonld.php — Parent orchestrator.
* @see ARCHITECTURE.md — §2.7 JSON-LD output, Yoast integration contract.
* @package Peptide_Repo_Core
*/
class PR_Core_Jsonld_Webpage {

View File

@@ -1,6 +1,12 @@
<?php
declare(strict_types=1);
/**
* Integrates Drug, MedicalWebPage, and FAQPage schema into Yoast's graph
*
* @package Peptide_Repo_Core
*/
/**
* JSON-LD / schema.org structured data emission for peptide pages.
*
@@ -32,7 +38,6 @@ declare(strict_types=1);
* @see frontend/class-pr-core-jsonld-webpage.php — MedicalWebPage enrichment.
* @see frontend/class-pr-core-jsonld-faq.php — FAQPage piece builder.
* @see ARCHITECTURE.md — §2.7 JSON-LD output.
* @package Peptide_Repo_Core
*/
class PR_Core_Jsonld {

View File

@@ -1,6 +1,12 @@
<?php
declare(strict_types=1);
/**
* Appends last-verified date after verdict card on reader-facing pages
*
* @package Peptide_Repo_Core
*/
/**
* Frontend verification date display on peptide single pages.
*
@@ -9,7 +15,6 @@ declare(strict_types=1);
* Dependencies: None (hooked via the_content).
*
* @see includes/class-pr-core.php — Registers the_content hook.
* @package Peptide_Repo_Core
*/
class PR_Core_Verification_Display {