Files
pr-vision/includes/collector/interface-prv-data-collector.php
peptiderepo 7d254019c6 PHPCS: fix file docblock format (short description + blank line after)
File-level docblocks lacked a short description and required blank line
between the block and declare(strict_types=1). WP PHPCS file comment
sniff requires both. All 21 PHP files corrected.

Agent-Session: pr-vision rename v0.1.1
2026-06-13 09:46:19 +00:00

47 lines
1.3 KiB
PHP

<?php
/**
* Contract for all PR Vision data collectors.
*
* @package PrVision
*/
declare(strict_types=1);
/**
* Seam: contract for all PR Vision data collectors.
*
* V1 implements only PRV_Ai_Visibility_Collector. Future collectors
* (keyword rankings, schema coverage, technical-SEO) implement this
* interface and register themselves with PRV_Collector_Registry without
* changing the dashboard shell.
*
* Who triggers: PRV_Collector_Registry dispatches registered collectors.
* Dependencies: None — pure interface.
*
* @see class-prv-ai-visibility-collector.php — v1 implementation.
* @see class-prv-collector-registry.php — Registration hub.
* @see ARCHITECTURE.md — §Collector/Panel seam.
* @package PrVision
*/
interface PRV_Data_Collector {
/**
* Collect and return the data payload for this category.
*
* The return shape is collector-specific; the dashboard panel for this
* category receives the same array and is responsible for rendering it.
*
* @return array<string, mixed> Collected data.
*/
public function collect(): array;
/**
* Short machine key identifying this collector (e.g. "ai_visibility").
*
* Used as the registry key and as the panel lookup key.
*
* @return string
*/
public function get_key(): string;
}