findings = $findings; $this->rule_pack = $rule_pack; $this->check_id = $check_id; if ( ! in_array( $check_id, $rule_pack->check_ids(), true ) ) { throw new \InvalidArgumentException( 'privacy_rule_pack_unknown' ); } } public function id(): string { return $this->check_id; } /** @return array */ public function execute( string $timestamp ): array { try { $pack = $this->rule_pack->pack( $this->check_id ); $total = count( $pack['statements'] ); } catch ( Throwable $exception ) { return $this->findings->build( $this->check_id, 'error', array( 'statement' => 'versioned_pack_unavailable', 'state' => 'error', 'limitations' => array( 'The bundled checklist could not be validated. No operator answer or exception was stored.' ), ), 0, 0, 'error', $timestamp ); } return $this->findings->build( $this->check_id, 'not_tested', array( 'statement' => $total . '_versioned_statements', 'state' => 'unreviewed', 'limitations' => array( 'This is an unanswered local self-check, not automatic evidence, legal advice or a compliance certificate.' ), ), 0, $total, 'none', $timestamp ); } }