| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 10 | public function __construct(JavaException $javaException, ?string $msg = null, ?int $code = null) |
|
| 26 | { |
||
| 27 | 10 | $this->javaException = $javaException; |
|
| 28 | 10 | $message = sprintf( |
|
| 29 | 10 | '%s[%s]: %s (%s)', |
|
| 30 | 10 | $msg !== null ? "$msg. " : '', |
|
| 31 | 10 | $javaException->getJavaClassName(), |
|
| 32 | 10 | $javaException->getMessage(), |
|
| 33 | 10 | $javaException->getCause() |
|
| 34 | ); |
||
| 35 | 10 | parent::__construct($message, $code ?? $javaException->getCode()); |
|
| 36 | 10 | } |
|
| 54 |