| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function __construct(string $signature, string $path) |
||
| 31 | { |
||
| 32 | if (extension_loaded('openssl')) { |
||
| 33 | $this->hash = new OpenSsl($signature, $path); |
||
| 34 | } elseif (class_exists('Crypt_RSA')) { |
||
| 35 | $this->hash = new PhpSeclib($signature, $path); |
||
| 36 | } else { |
||
| 37 | throw SignatureException::create( |
||
| 38 | 'The "openssl" extension and "phpseclib" libraries are not available.' |
||
| 39 | ); |
||
| 59 |