- 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
29 lines
758 B
PHP
29 lines
758 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Defines the contract for retrieving posts related to a given peptide
|
|
*
|
|
* @package Peptide_Repo_Core
|
|
*/
|
|
|
|
/**
|
|
* Interface for fetching related posts for a peptide.
|
|
*
|
|
* What: Defines the contract for retrieving posts related to a given peptide.
|
|
* Who calls it: PR_Core_Related_Posts_Section uses implementations to fetch related articles.
|
|
* Dependencies: None.
|
|
*
|
|
*/
|
|
interface PR_Core_Related_Posts_Provider {
|
|
|
|
/**
|
|
* Get posts related to a peptide.
|
|
*
|
|
* @param int $peptide_id The peptide post ID.
|
|
* @param int $limit Maximum number of posts to return.
|
|
* @return array<int, \WP_Post> Array of WP_Post objects (may be empty).
|
|
*/
|
|
public function get_posts( int $peptide_id, int $limit ): array;
|
|
}
|