Skip to content
Corex

CaptchaDiagnostic

Corex\Captcha\CaptchaDiagnostic · class · Add-ons layer

Classifies a captcha “Test verification” (spec 044, US2) into a stable kind + a human message. Pure and secret-free by construction — it is given only the presence of the keys (booleans) and the provider’s response shape, never the secret, so a result can never carry one (FR-008 / SC-006).

classify(string $driver, bool $hasSiteKey, bool $hasSecret, ?bool $verified, bool $networkError): self

Section titled “classify(string $driver, bool $hasSiteKey, bool $hasSecret, ?bool $verified, bool $networkError): self”

Direct classification from booleans (used in unit tests and the simple paths).

fromVerifyResponse(string $driver, bool $hasSiteKey, bool $hasSecret, ?array $body, bool $networkError): self

Section titled “fromVerifyResponse(string $driver, bool $hasSiteKey, bool $hasSecret, ?array $body, bool $networkError): self”

Classification from a provider siteverify response. A probe token that fails only because the token is bad (not the secret) proves the keys are valid → ok.

Whether the keys worked: the answer a remembered test keeps (spec 119, US-SET-03).

Why the test failed, in a few words said after “Last test failed on :”; empty when it worked.