| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 15 | protected function createKey(): OpenSSLAsymmetricKey |
|
| 26 | { |
||
| 27 | 15 | $key = openssl_pkey_get_public($this->getContent()); |
|
| 28 | 15 | if (false === $key) { |
|
| 29 | 1 | throw new SignerException( |
|
| 30 | 1 | sprintf('"%s" is not valid public key.', $this->file) |
|
| 31 | 1 | ); |
|
| 32 | } |
||
| 33 | |||
| 34 | 14 | return $this->key = $key; |
|
| 35 | } |
||
| 37 |