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

Fix PHPStan error

This commit is contained in:
lukinovec 2026-04-13 14:26:41 +02:00
parent 697ba6592b
commit b74416721a

View file

@ -10,6 +10,7 @@ use Illuminate\Log\LogManager;
use Illuminate\Support\Arr;
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
use Stancl\Tenancy\Contracts\Tenant;
use Illuminate\Database\Eloquent\Model;
/**
* This bootstrapper makes it possible to configure tenant-specific logging.
@ -129,6 +130,7 @@ class LogTenancyBootstrapper implements TenancyBootstrapper
// If the tenant attribute is null,
// the override is ignored and the channel config key's value remains unchanged.
foreach ($override as $configKey => $tenantAttributeName) {
/** @var Tenant&Model $tenant */
$tenantAttribute = Arr::get($tenant, $tenantAttributeName);
if ($tenantAttribute !== null) {