| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 3 | public function __construct(string ...$certs) |
|
| 25 | { |
||
| 26 | 3 | foreach ($certs as $cert) { |
|
| 27 | 3 | if (!Base64::isValid($cert)) { |
|
| 28 | 1 | throw new \UnexpectedValueException( |
|
| 29 | 3 | 'Certificate must be base64 encoded.'); |
|
| 30 | } |
||
| 31 | } |
||
| 32 | 2 | parent::__construct(self::PARAM_X509_CERTIFICATE_CHAIN, $certs); |
|
| 33 | 2 | } |
|
| 35 |