| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 77.78% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class TrustAttestationTypeVoter implements TrustVoterInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $trustedType; |
||
| 18 | |||
| 19 | 18 | public function __construct(string $attestationType) |
|
| 20 | { |
||
| 21 | 18 | if (!AttestationType::isValidType($attestationType)) { |
|
| 22 | throw new InvalidArgumentException(sprintf('Type "%s" is not a valid attestation type.', $attestationType)); |
||
| 23 | } |
||
| 24 | |||
| 25 | 18 | $this->trustedType = $attestationType; |
|
| 26 | 18 | } |
|
| 27 | |||
| 28 | 1 | public function voteOnTrust( |
|
| 37 | } |
||
| 38 | } |
||
| 39 |