1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 04:04:04 +00:00

resolve all phpstan issues

This commit is contained in:
Samuel Štancl 2022-11-08 13:34:04 +01:00
parent b7a6953231
commit 942d79cbd7
12 changed files with 57 additions and 88 deletions

View file

@ -42,8 +42,7 @@ class Tenancy
}
}
// todo1 for phpstan this should be $this->tenant?, but first I want to clean up the $initialized logic and explore removing the property
if ($this->initialized && $this->tenant->getTenantKey() === $tenant->getTenantKey()) {
if ($this->initialized && $this->tenant?->getTenantKey() === $tenant->getTenantKey()) {
return;
}
@ -52,6 +51,7 @@ class Tenancy
$this->end();
}
/** @var Tenant&Model $tenant */
$this->tenant = $tenant;
event(new Events\InitializingTenancy($this));