| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 12 | public function analyzeRequest(ServerRequestInterface $request): FormShieldReportInterface |
|
| 39 | { |
||
| 40 | 12 | $builder = new FormShieldReportBuilder(); |
|
| 41 | |||
| 42 | 12 | foreach ($this->policies as $name => $policy) { |
|
| 43 | 12 | if (!$policy->approvesRequest($request)) { |
|
| 44 | 6 | $status = false; |
|
| 45 | 6 | $builder->withRuleViolation($name); |
|
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | 12 | $builder->withVerificationStatus($status ?? true); |
|
| 50 | |||
| 51 | 12 | return $builder->build(); |
|
| 52 | } |
||
| 54 |