Skip to content

Commit 61114e2

Browse files
committed
import namespaces
1 parent 7bc1ff4 commit 61114e2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Actions/MakeQueueTenantAwareAction.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
use Illuminate\Queue\Events\JobRetryRequested;
77
use Illuminate\Support\Arr;
88
use Illuminate\Support\Facades\Context;
9+
use ReflectionClass;
910
use Spatie\Multitenancy\Concerns\BindAsCurrentTenant;
1011
use Spatie\Multitenancy\Concerns\UsesMultitenancyConfig;
1112
use Spatie\Multitenancy\Contracts\IsTenant;
1213
use Spatie\Multitenancy\Exceptions\CurrentTenantCouldNotBeDeterminedInTenantAwareJob;
1314
use Spatie\Multitenancy\Jobs\NotTenantAware;
1415
use Spatie\Multitenancy\Jobs\TenantAware;
16+
use Throwable;
1517

1618
class MakeQueueTenantAwareAction
1719
{
@@ -49,7 +51,7 @@ protected function isTenantAware(JobProcessing|JobRetryRequested $event): bool
4951

5052
try {
5153
$command = unserialize($payload['data']['command']);
52-
} catch (\Throwable) {
54+
} catch (Throwable) {
5355
/**
5456
* We might need the tenant to unserialize jobs as models could
5557
* have global scopes set that require a current tenant to
@@ -65,7 +67,7 @@ protected function isTenantAware(JobProcessing|JobRetryRequested $event): bool
6567

6668
$job = $this->getJobFromQueueable($command);
6769

68-
$reflection = new \ReflectionClass($job);
70+
$reflection = new ReflectionClass($job);
6971

7072
if ($reflection->implementsInterface(TenantAware::class)) {
7173
return true;

0 commit comments

Comments
 (0)