*/ public $evidence; /** * Check-specific structured data (e.g. checkedBots, skillCount). * * @var array|null */ public $details; /** * Wall-clock duration of the check run, in milliseconds. * * @var int */ public $duration_ms = 0; /** * Constructor. * * @param string $status One of the STATUS_* constants. * @param string $message One-line outcome. * @param array $evidence Evidence steps. * @param array|null $details Structured details, or null. */ public function __construct( string $status, string $message, array $evidence = array(), $details = null ) { $this->status = $status; $this->message = $message; $this->evidence = $evidence; $this->details = $details; } /** * Serialize for storage / REST / JS consumption. * * @return array */ public function to_array(): array { $out = array( 'status' => $this->status, 'message' => $this->message, 'evidence' => $this->evidence, 'durationMs' => $this->duration_ms, ); if ( null !== $this->details ) { $out['details'] = $this->details; } return $out; } }