Files
prautoblogger/includes/models/class-editorial-review.php
peptiderepo 0e1551be42 fix(phpcs): move ignore pragmas into file-level docblocks
File-level sniffs like WordPress.Files.FileName are evaluated at the file level,
not at code level. They require phpcs:ignore directives to be placed within the
file-level docblock (/** ... */), not in code comments.

Moved all 81 phpcs:ignore pragmas from code comments to the file-level docblocks.
This applies to:
- 79 class files with class-naming convention ignores
- prautoblogger.php with strict-types docblock ignore
- uninstall.php with strict-types docblock ignore
2026-04-23 03:26:50 +00:00

67 lines
1.8 KiB
PHP
Executable File

<?php
declare(strict_types=1);
/**
* phpcs:ignore WordPress.Files.FileName.InvalidClassFileName -- class naming convention differs from WordPress standard
*
* Value object representing the chief editor agent's review of generated content.
*
* Triggered by: Chief_Editor creates these; Publisher consumes them.
* Dependencies: None — pure data object.
*
* @see core/class-chief-editor.php — Creates these after reviewing content.
* @see core/class-publisher.php — Uses verdict to decide publish vs. draft.
*/
class PRAutoBlogger_Editorial_Review {
private string $verdict;
private string $notes;
private ?string $revised_content;
private float $quality_score;
private float $seo_score;
private array $issues;
/**
* @param array{
* verdict: string,
* notes: string,
* revised_content?: string|null,
* quality_score?: float,
* seo_score?: float,
* issues?: string[],
* } $data
*/
public function __construct( array $data ) {
$this->verdict = $data['verdict']; // 'approved', 'revised', 'rejected'
$this->notes = $data['notes'];
$this->revised_content = $data['revised_content'] ?? null;
$this->quality_score = (float) ( $data['quality_score'] ?? 0.0 );
$this->seo_score = (float) ( $data['seo_score'] ?? 0.0 );
$this->issues = $data['issues'] ?? array();
}
public function get_verdict(): string {
return $this->verdict;
}
public function get_notes(): string {
return $this->notes;
}
public function get_revised_content(): ?string {
return $this->revised_content;
}
public function get_quality_score(): float {
return $this->quality_score;
}
public function get_seo_score(): float {
return $this->seo_score;
}
public function get_issues(): array {
return $this->issues;
}
}