From bc3ade9fb9e99b4682abd5c3693ab28fc33d0b64 Mon Sep 17 00:00:00 2001 From: Shashwat Mishra <11258035+secrethash@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:39:41 +0530 Subject: [PATCH] fix: update tenancy namespace --- src/Bucket.php | 12 ++++++------ src/Jobs/CreateTenantBucket.php | 4 ++-- src/Jobs/DeleteTenantBucket.php | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Bucket.php b/src/Bucket.php index 9f4e4c4..91dbf8f 100644 --- a/src/Bucket.php +++ b/src/Bucket.php @@ -6,7 +6,7 @@ use Aws\Exception\AwsException; use Aws\S3\S3Client; use Illuminate\Support\Facades\Log; -use Stancl\Tenancy\Contracts\TenantWithDatabase; +use Stancl\Tenancy\Contracts\Tenant; use Vidwan\TenantBuckets\Events\CreatedBucket; use Vidwan\TenantBuckets\Events\CreatingBucket; use Vidwan\TenantBuckets\Events\DeletedBucket; @@ -47,7 +47,7 @@ class Bucket protected AwsException|null $e; public function __construct( - protected TenantWithDatabase $tenant + protected Tenant $tenant ) { $this->setupCredentials(); } @@ -93,7 +93,7 @@ public function deleteTenantBucket(): self * Create a New Bucket * * @param string $name Name of the S3 Bucket - * @param Aws\Credentials\Credentials $credentials AWS Credentials Object + * @param \Aws\Credentials\Credentials $credentials AWS Credentials Object * @access public * @return self $this */ @@ -134,7 +134,7 @@ public function createBucket(string $name, Credentials $credentials): self * Create a New Bucket * * @param string $name Name of the S3 Bucket - * @param Aws\Credentials\Credentials $credentials AWS Credentials Object + * @param \Aws\Credentials\Credentials $credentials AWS Credentials Object * @access public * @return self $this */ @@ -180,7 +180,7 @@ public function getBucketName(): string|null } /** - * Get Error Messsge + * Get Error Message * * @return string|null */ @@ -198,6 +198,6 @@ public function getErrorMessage(): string|null */ public function getErrorBag(): AwsException|null { - return $this->e ? $this->e : null; + return $this->e ?: null; } } diff --git a/src/Jobs/CreateTenantBucket.php b/src/Jobs/CreateTenantBucket.php index 7017ab5..f6c68e1 100644 --- a/src/Jobs/CreateTenantBucket.php +++ b/src/Jobs/CreateTenantBucket.php @@ -7,7 +7,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Stancl\Tenancy\Contracts\TenantWithDatabase; +use Stancl\Tenancy\Contracts\Tenant; use Vidwan\TenantBuckets\Bucket; class CreateTenantBucket implements ShouldQueue @@ -42,7 +42,7 @@ class CreateTenantBucket implements ShouldQueue * * @return void */ - public function __construct(TenantWithDatabase $tenant) + public function __construct(Tenant $tenant) { // $this->tenant = $tenant; diff --git a/src/Jobs/DeleteTenantBucket.php b/src/Jobs/DeleteTenantBucket.php index 11b9961..7b3a039 100644 --- a/src/Jobs/DeleteTenantBucket.php +++ b/src/Jobs/DeleteTenantBucket.php @@ -7,7 +7,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Stancl\Tenancy\Contracts\TenantWithDatabase; +use Stancl\Tenancy\Contracts\Tenant; use Vidwan\TenantBuckets\Bucket; class DeleteTenantBucket implements ShouldQueue @@ -42,7 +42,7 @@ class DeleteTenantBucket implements ShouldQueue * * @return void */ - public function __construct(TenantWithDatabase $tenant) + public function __construct(Tenant $tenant) { // $this->tenant = $tenant;