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:
parent
1798ca9c85
commit
6955512a6b
133 changed files with 379 additions and 203 deletions
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Listeners;
|
||||
|
||||
use Stancl\Tenancy\Events\BootstrappingTenancy;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Listeners;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue