Skip to content
Corex

InsightResult

Corex\Config\Insights\InsightResult · class · Config layer

One provider’s result: a 0–100 score (derived grade + status), a one-line summary, a list of metrics ({label, value, unit}), and a list of plain-language recommendations. Immutable and self-describing — the same shape feeds the REST response, the cache, and the admin card, and never carries a secret. A run that could not complete is a failed result (spec 114, US-SAFE-12): no score, no grade, the failure’s kind and the reason as its summary. It was stored as a score of 50, which drew a D for a site nobody had measured.

__construct(string $providerId, string $label, ?int $score, string $summary, array $metrics, array $recommendations, int $checkedAt, string $failure)

Section titled “__construct(string $providerId, string $label, ?int $score, string $summary, array $metrics, array $recommendations, int $checkedAt, string $failure)”

failed(string $providerId, string $label, string $failure, string $reason, int $checkedAt): self

Section titled “failed(string $providerId, string $label, string $failure, string $reason, int $checkedAt): self”

A run that could not complete, and why, in words.