| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function __construct(string $key, string $passphrase = '', ?string $id = null) |
||
| 26 | { |
||
| 27 | $content = realpath($key) ? file_get_contents(realpath($key)) : $key; |
||
| 28 | |||
| 29 | $this->resource = openssl_pkey_get_private($content, $passphrase); |
||
| 30 | if ($this->resource === false) { |
||
| 31 | throw new InvalidKeyException(openssl_error_string()); |
||
| 32 | } |
||
| 33 | |||
| 34 | $this->id = $id; |
||
| 35 | } |
||
| 50 |