1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 14:24:04 +00:00

Improve readability of harden() call

This commit is contained in:
lukinovec 2026-05-01 14:43:27 +02:00
parent 7f93f4460a
commit 7660ddd3ab

View file

@ -51,15 +51,15 @@ class DatabaseTenancyBootstrapper implements TenancyBootstrapper
$this->database->connectToTenant($tenant);
try {
if (static::$harden) {
if (static::$harden) {
try {
$this->harden($tenant);
}
} catch (RuntimeException $e) {
// Revert connection back to central
$this->revert();
} catch (RuntimeException $e) {
// Revert connection back to central
$this->revert();
throw $e;
throw $e;
}
}
}