Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
39 | public function process(ServerRequestInterface $request, array $results): ?FormProcessReportInterface |
||
40 | { |
||
41 | $violations = []; |
||
42 | |||
43 | foreach ($results as $field => $result) { |
||
44 | if (false === $result->validationStatus()) { |
||
45 | $violations[$field] = $result->ruleViolations(); |
||
46 | } |
||
47 | } |
||
48 | |||
49 | $status = $this->cache->set($this->key, $violations, $this->ttl); |
||
50 | |||
51 | return new FormProcessReport([ |
||
52 | 'successful' => $status, |
||
53 | 'violations' => $violations, |
||
54 | ]); |
||
57 |