PHPCS Squiz.Commenting.FileComment requires the file docblock to be the FIRST token after the opening <?php tag. Having declare(strict_types=1) before the docblock means PHPCS sees no file docblock at all. Fix: in every includes/*.php file, insert a minimal /** @package ... */ docblock immediately after <?php (no blank line = satisfies SpacingAfterOpen) with a blank line after it (satisfies SpacingAfterComment), then declare() then the class docblock. Also fixes peptide-repo-core.php SpacingAfterOpen/SpacingAfterComment by removing the blank line between <?php and the existing file docblock and ensuring one blank line after it. Agent-Session: claude-adopt-ci-20260616
32 lines
794 B
PHP
32 lines
794 B
PHP
<?php
|
|
/**
|
|
* @package Peptide_Repo_Core
|
|
*/
|
|
|
|
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;
|
|
}
|