mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 00:14:04 +00:00
Fix code style (php-cs-fixer)
This commit is contained in:
parent
12eb0ad0cc
commit
9dd4777a97
3 changed files with 5 additions and 6 deletions
|
|
@ -4,13 +4,13 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\ResourceSyncing\Listeners;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Stancl\Tenancy\Listeners\QueueableListener;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\SyncedResourceDeleted;
|
||||
use Stancl\Tenancy\ResourceSyncing\SyncMaster;
|
||||
use Stancl\Tenancy\ResourceSyncing\Syncable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
use Stancl\Tenancy\ResourceSyncing\SyncMaster;
|
||||
|
||||
class DeleteResourceMapping extends QueueableListener
|
||||
{
|
||||
|
|
@ -27,7 +27,7 @@ class DeleteResourceMapping extends QueueableListener
|
|||
// Delete pivot records if the central resource doesn't use soft deletes
|
||||
// or the central resource was deleted using forceDelete()
|
||||
if ($event->forceDelete || ! in_array(SoftDeletes::class, class_uses_recursive($centralResource::class), true)) {
|
||||
Pivot::withoutEvents(function() use ($centralResource, $event) {
|
||||
Pivot::withoutEvents(function () use ($centralResource, $event) {
|
||||
$centralResource?->tenants()->detach($event->tenant);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\ResourceSyncing\Listeners;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Stancl\Tenancy\Listeners\QueueableListener;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\SyncMasterDeleted;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator;
|
|||
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\CentralResourceAttachedToTenant;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\CentralResourceDetachedFromTenant;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\SyncedResourceDeleted;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\SyncedResourceSaved;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\SyncMasterDeleted;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\SyncMasterRestored;
|
||||
use Stancl\Tenancy\ResourceSyncing\Events\SyncedResourceDeleted;
|
||||
|
||||
trait ResourceSyncing
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue