1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 21:54:03 +00:00

Apply fixes from StyleCI

This commit is contained in:
stancl 2020-05-22 09:01:31 +00:00 committed by StyleCI Bot
parent 1798ca9c85
commit 6955512a6b
133 changed files with 379 additions and 203 deletions

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Listeners;
use Stancl\Tenancy\Events\BootstrappingTenancy;

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Listeners;
use Illuminate\Contracts\Queue\ShouldQueue;

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Listeners;
use Stancl\Tenancy\Events\RevertedToCentralContext;
@ -17,5 +19,5 @@ class RevertToCentralContext
}
event(new RevertedToCentralContext($event->tenancy));
}
}
}

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Listeners;
use Illuminate\Database\Eloquent\Model;
@ -70,7 +72,7 @@ class UpdateSyncedResource extends QueueableListener
$mappingExists = $centralModel->tenants->contains($currentTenantMapping);
if (!$mappingExists) {
if (! $mappingExists) {
// Here we should call TenantPivot, but we call general Pivot, so that this works
// even if people use their own pivot model that is not based on our TenantPivot
Pivot::withoutEvents(function () use ($centralModel, $event) {
@ -80,7 +82,7 @@ class UpdateSyncedResource extends QueueableListener
return $centralModel->tenants->filter(function ($model) use ($currentTenantMapping) {
// Remove the mapping for the current tenant.
return !$currentTenantMapping($model);
return ! $currentTenantMapping($model);
});
}