olderDbExists = true; return $e; } public static function withoutOlderDb(Throwable|null $prev = null): self { $e = new self( 'An error occurred while updating geolocation database, and an older version could not be found.', $prev, ); $e->olderDbExists = false; return $e; } public static function withInvalidEpochInOldDb(mixed $buildEpoch): self { $e = new self(sprintf( 'Build epoch with value "%s" from existing geolocation database, could not be parsed to integer.', $buildEpoch, )); $e->olderDbExists = true; return $e; } public function olderDbExists(): bool { return $this->olderDbExists; } }