| Total Complexity | 2 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class GeolocationDbUpdateFailedException extends RuntimeException implements ExceptionInterface |
||
| 11 | { |
||
| 12 | private bool $olderDbExists; |
||
| 13 | |||
| 14 | 13 | public static function create(bool $olderDbExists, ?Throwable $prev = null): self |
|
| 15 | { |
||
| 16 | 13 | $e = new self( |
|
| 17 | 13 | 'An error occurred while updating geolocation database, and an older version could not be found', |
|
| 18 | 13 | 0, |
|
| 19 | $prev, |
||
| 20 | ); |
||
| 21 | 13 | $e->olderDbExists = $olderDbExists; |
|
| 22 | |||
| 23 | 13 | return $e; |
|
| 24 | } |
||
| 25 | |||
| 26 | 13 | public function olderDbExists(): bool |
|
| 29 | } |
||
| 30 | } |
||
| 31 |