Skip to content

Commit

Permalink
fix: update tenancy namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
secrethash committed Dec 10, 2024
1 parent 461f35f commit bc3ade9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/Bucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -47,7 +47,7 @@ class Bucket
protected AwsException|null $e;

public function __construct(
protected TenantWithDatabase $tenant
protected Tenant $tenant
) {
$this->setupCredentials();
}
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -180,7 +180,7 @@ public function getBucketName(): string|null
}

/**
* Get Error Messsge
* Get Error Message
*
* @return string|null
*/
Expand All @@ -198,6 +198,6 @@ public function getErrorMessage(): string|null
*/
public function getErrorBag(): AwsException|null
{
return $this->e ? $this->e : null;
return $this->e ?: null;
}
}
4 changes: 2 additions & 2 deletions src/Jobs/CreateTenantBucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -42,7 +42,7 @@ class CreateTenantBucket implements ShouldQueue
*
* @return void
*/
public function __construct(TenantWithDatabase $tenant)
public function __construct(Tenant $tenant)
{
//
$this->tenant = $tenant;
Expand Down
4 changes: 2 additions & 2 deletions src/Jobs/DeleteTenantBucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -42,7 +42,7 @@ class DeleteTenantBucket implements ShouldQueue
*
* @return void
*/
public function __construct(TenantWithDatabase $tenant)
public function __construct(Tenant $tenant)
{
//
$this->tenant = $tenant;
Expand Down

0 comments on commit bc3ade9

Please sign in to comment.