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

Update currentOrFail declaration

Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
lukinovec 2022-10-11 07:55:55 +02:00 committed by GitHub
parent 7eb8356c74
commit 2201545c51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,7 +51,8 @@ class Tenant extends Model implements Contracts\Tenant
return tenant();
}
public static function currentOrFail(): self
/** @throws TenancyNotInitializedException */
public static function currentOrFail(): static
{
return static::current() ?? throw new TenancyNotInitializedException;
}