From 2201545c51a6486cf0e309219ca19486f1db4280 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Tue, 11 Oct 2022 07:55:55 +0200 Subject: [PATCH] Update currentOrFail declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Samuel Ć tancl --- src/Database/Models/Tenant.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Database/Models/Tenant.php b/src/Database/Models/Tenant.php index a0732d2d..f6c9d6a7 100644 --- a/src/Database/Models/Tenant.php +++ b/src/Database/Models/Tenant.php @@ -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; }