| Conditions | 1 |
| Paths | 1 |
| Total Lines | 5 |
| Code Lines | 1 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 1 | public static function fromOriginalException(Exception $e): ReadWriteException |
|
| 22 | { |
||
| 23 | // $code must be int, otherwise this throws with Error("Wrong parameters for ReadWriteException") |
||
| 24 | // PDOException::getCode() can return a sting |
||
| 25 | 1 | return new self($e->getMessage(), (int)$e->getCode(), $e ); |
|
| 26 | } |
||
| 28 |