1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 11:14:03 +00:00

Redundant variable '$domain', because $tenant is not null, only, when current domain is found and relationship is loaded (with only one domain).

This commit is contained in:
Ralfs 2021-04-12 15:39:21 +03:00
parent 3145d8330d
commit 1d3bb6dc27

View file

@ -42,11 +42,8 @@ class DomainTenantResolver extends Contracts\CachedTenantResolver
]) ])
->first(); ->first();
/** @var Domain|null $domain */ if ($tenant) {
$domain = $tenant ? $tenant->domains->first() : null; static::$currentDomain = $tenant->domains->first();
if ($domain) {
static::$currentDomain = $domain;
return $tenant; return $tenant;
} }