From 39503fe76b370bde0e784f8dab7fd0f988ae88c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Sun, 8 Sep 2019 11:41:34 +0200 Subject: [PATCH] Docblocks --- src/Contracts/StorageDriver.php | 15 ++++++++++++++- src/TenantManagerv2.php | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Contracts/StorageDriver.php b/src/Contracts/StorageDriver.php index 609537d3..4b80e3b6 100644 --- a/src/Contracts/StorageDriver.php +++ b/src/Contracts/StorageDriver.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Stancl\Tenancy\Contracts; use Stancl\Tenancy\Tenant; +use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException; interface StorageDriver { @@ -12,7 +13,19 @@ interface StorageDriver public function updateTenant(Tenant $tenant): bool; // todo return type + /** + * Find a tenant using an id. + * + * @param string $id + * @return Tenant + * @throws TenantCouldNotBeIdentifiedException + */ public function findById(string $id): Tenant; - + /** + * Find a tenant using a domain name. + * + * @param string $domain + * @return Tenant + */ public function findByDomain(string $domain): Tenant; } diff --git a/src/TenantManagerv2.php b/src/TenantManagerv2.php index a5d5e387..df15593d 100644 --- a/src/TenantManagerv2.php +++ b/src/TenantManagerv2.php @@ -66,7 +66,7 @@ class TenantManagerv2 } /** - * Identify a tenant using id. + * Find a tenant using an id. * * @param string $id * @return Tenant @@ -78,7 +78,7 @@ class TenantManagerv2 } /** - * Identify a tenant using id. + * Find a tenant using a domain name. * * @param string $id * @return Tenant