| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 23.08% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class DB2Exception extends AbstractDriverException |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @param resource|null $connection |
||
| 17 | */ |
||
| 18 | public static function fromConnectionError($connection = null) : self |
||
| 19 | { |
||
| 20 | if ($connection !== null) { |
||
| 21 | return new self(db2_conn_errormsg($connection), db2_conn_error($connection)); |
||
| 22 | } |
||
| 23 | |||
| 24 | return new self(db2_conn_errormsg(), db2_conn_error()); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param resource|null $statement |
||
| 29 | */ |
||
| 30 | 70 | public static function fromStatementError($statement = null) : self |
|
| 37 | } |
||
| 38 | } |
||
| 39 |