| Total Complexity | 2 |
| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 7 | class CursorException extends DriverException |
||
| 8 | { |
||
| 9 | public static function forEmptyResult(): CursorException |
||
| 10 | { |
||
| 11 | return new self('Could not fetch empty result.'); |
||
| 12 | } |
||
| 13 | |||
| 14 | public static function forExecutionFailure(Cursor $cursor, string $reason): CursorException |
||
| 15 | { |
||
| 16 | $cursor = get_class($cursor); |
||
| 17 | |||
| 18 | return new self("Could not execute cursor ${cursor}, reason: ${reason}"); |
||
| 19 | } |
||
| 21 |