| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 17 | public function __construct(string $publicKey) |
||
| 18 | { |
||
| 19 | if (!preg_match('/^\-\-\-\-\-BEGIN PUBLIC KEY\-\-\-\-\-[\S\n]+\-\-\-\-\-END PUBLIC KEY\-\-\-\-\-$/', $publicKey)) { |
||
| 20 | throw new InvalidArgumentException("Invalid PublicKey format. Please use a shielded format"); |
||
| 21 | } |
||
| 22 | |||
| 23 | $this->key = $publicKey; |
||
| 24 | } |
||
| 25 | |||
| 43 |