ShhException::throwFromLastOpenSSLError()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
nc 1
nop 1
1
<?php
2
3
namespace BenTools\Shh;
4
5
/**
6
 * @internal
7
 */
8
final class ShhException extends \RuntimeException
9
{
10
    /**
11
     * @param string $defaultMessage
12
     */
13
    public static function throwFromLastOpenSSLError(string $defaultMessage = 'Unexpected OpenSSL Exception')
14
    {
15
        throw new self(\openssl_error_string() ?: $defaultMessage);
16
    }
17
}
18