1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 10:34:04 +00:00

Check if cached tenant is truthy

This commit is contained in:
lukinovec 2023-01-11 08:18:22 +01:00
parent 8d06952324
commit 46b1cfb1fb

View file

@ -27,8 +27,7 @@ abstract class CachedTenantResolver implements TenantResolver
$key = $this->getCacheKey(...$args);
$tenant = $this->cache->has($key) ? $this->cache->get($key) : null;
if ($tenant) {
if ($tenant = $this->cache->get($key)) {
$this->resolved($tenant, ...$args);
return $tenant;