Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 6.9849 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | 1 | public function voteOnTrust( |
|
13 | RegistrationResultInterface $registrationResult, |
||
14 | TrustPathInterface $trustPath, |
||
15 | ?MetadataInterface $metadata |
||
16 | ): TrustVote { |
||
17 | 1 | if ($metadata === null) { |
|
18 | 1 | return TrustVote::abstain(); |
|
19 | } |
||
20 | |||
21 | foreach ($metadata->getStatusReports() as $sr) { |
||
22 | if ($sr->hasUndesiredStatus()) { |
||
23 | return TrustVote::untrusted(); |
||
24 | } |
||
25 | } |
||
26 | return TrustVote::abstain(); |
||
27 | } |
||
29 |