Files
pr-vision/includes/panel/interface-prv-dashboard-panel.php
peptiderepo 68ae5b9b1a PHPCS compliance: fix pre-existing violations exposed by gating the lint step
All violations were present in v0.1.0 and hidden by continue-on-error.
Now that PHPCS gates the build (P2-B), they must be fixed.

- Add file-level @package doc comment to all PHP files (file doc requirement)
- Add short descriptions to @var and constructor docblocks throughout
- Fix @param type spacing throughout (PHPCS alignment rules)
- Expand phpcs:ignore lines to include NoCaching where DirectQuery is already
  suppressed (uninstall.php, cost-ledger, table-manager, collector)
- Suppress EscapeOutput.ExceptionNotEscaped on RuntimeException messages
  (exception strings are not HTML output)
- Suppress error_log_error_log on the probe-runner failure log
- Replace date() with gmdate() in panel (timezone-aware per WP standard)
- Convert inline associative arrays to multi-line in config (WP array style)
- Fix double-arrow alignment in probe-runner counts and insert arrays
- Fix double-space before ?? in provider constructors
- Expand phpcs:ignore for  reads to include MissingUnslash
- Fix $counts++ to ++$counts (prefix increment per WP standard)
- Fix V1/v1 capitalisation in interface doc long description

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

40 lines
1.1 KiB
PHP

<?php
/** @package PrVision */
declare(strict_types=1);
/**
* Seam: contract for all PR Vision dashboard panels.
*
* Each panel renders one data category within the PR Vision admin page.
* v1 ships only PRV_Ai_Visibility_Panel. Future panels (keyword rankings,
* schema coverage…) implement this and register with PRV_Collector_Registry.
*
* Who triggers: PRV_Admin_Page when building the PR Vision page.
* Dependencies: None — pure interface.
*
* @see class-prv-ai-visibility-panel.php — v1 implementation.
* @see class-prv-collector-registry.php — Registration hub.
* @see ARCHITECTURE.md — §Collector/Panel seam.
* @package PrVision
*/
interface PRV_Dashboard_Panel {
/**
* Render the panel HTML into the current output buffer.
*
* Implementors MUST escape all output and MUST NOT echo raw DB values.
*
* @param array<string, mixed> $data Payload returned by the matching collector.
*
* @return void
*/
public function render( array $data ): void;
/**
* Short human-readable title for the panel tab / section heading.
*
* @return string
*/
public function get_title(): string;
}