feat: admin check steps with throwaway write test and reports
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LIT\MCP\Integrations\Divi\Release;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
/** The latest admin check report of this site (spec §6.3). Not final so the Divi tab can be tested with a mock. */
|
||||
class CheckReportStore
|
||||
{
|
||||
public const OPTION = 'lit_mcp_divi_check_report';
|
||||
|
||||
public function latest(): ?CheckReport
|
||||
{
|
||||
return CheckReport::fromArray(get_option(self::OPTION, null));
|
||||
}
|
||||
|
||||
public function save(CheckReport $report): void
|
||||
{
|
||||
update_option(self::OPTION, $report->toArray(), false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user