public function isReachable() : bool
{
if (is_null($this->disk)) {
return false;
}
try {
$this->disk->allFiles($this->backupName);
return true;
} catch (Exception $exception) {
$this->connectionError = $exception;
return false;
}
}
public function isHealthy() : bool { if (!$this->backupDestination->isReachable()) { return false; } if ($this->usesTooMuchStorage()) { return false; } if ($this->newestBackupIsTooOld()) { return false; } return true; }