diff --git a/src/Attributes/CurrentTenant.php b/src/Attributes/CurrentTenant.php index 332ea5e..b82d9d6 100644 --- a/src/Attributes/CurrentTenant.php +++ b/src/Attributes/CurrentTenant.php @@ -21,13 +21,11 @@ public function __construct(?string $tenancy = null) public function resolve(CurrentTenant $tenant, Container $container): ?Tenant { - $manager = $container->make(TenancyManager::class); - - if (! ($manager instanceof TenancyManager)) { - // We'll fail silently here...for reasons - return null; - } - - return $manager->get($this->tenancy)->tenant(); + /** + * It's not nullable, it'll be an exception + * + * @noinspection NullPointerExceptionInspection + */ + return $container->make(TenancyManager::class)->get($this->tenancy)->tenant(); } }