| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | 12 | public function __construct($privateKey) |
|
| 27 | { |
||
| 28 | 12 | if (!is_readable($privateKey)) { |
|
| 29 | 1 | throw new \InvalidArgumentException('The private key is not readable'); |
|
| 30 | } |
||
| 31 | |||
| 32 | 11 | if (!function_exists('openssl_pkey_get_private')) { |
|
| 33 | throw new \InvalidArgumentException('The OpenSSL-Extension seems not to be available. That is necessary to handle RSA-SHA1'); |
||
| 34 | } |
||
| 35 | |||
| 36 | 11 | $this->privateKey = $privateKey; |
|
| 37 | 11 | } |
|
| 66 |