From 4f9147bf81881bb8a54ae41b2652fcaa0cc5de13 Mon Sep 17 00:00:00 2001 From: PHP CS Fixer Date: Tue, 9 May 2023 14:07:40 +0000 Subject: [PATCH] Fix code style (php-cs-fixer) --- .../Integrations/PostgresTenancyBootstrapper.php | 4 ++-- src/Database/Concerns/BelongsToTenant.php | 3 +-- src/TenancyServiceProvider.php | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Bootstrappers/Integrations/PostgresTenancyBootstrapper.php b/src/Bootstrappers/Integrations/PostgresTenancyBootstrapper.php index 0a795ada..f18e3bcd 100644 --- a/src/Bootstrappers/Integrations/PostgresTenancyBootstrapper.php +++ b/src/Bootstrappers/Integrations/PostgresTenancyBootstrapper.php @@ -4,10 +4,10 @@ declare(strict_types=1); namespace Stancl\Tenancy\Bootstrappers\Integrations; -use Stancl\Tenancy\Contracts\Tenant; -use Illuminate\Database\DatabaseManager; use Illuminate\Contracts\Config\Repository; +use Illuminate\Database\DatabaseManager; use Stancl\Tenancy\Contracts\TenancyBootstrapper; +use Stancl\Tenancy\Contracts\Tenant; class PostgresTenancyBootstrapper implements TenancyBootstrapper { diff --git a/src/Database/Concerns/BelongsToTenant.php b/src/Database/Concerns/BelongsToTenant.php index 6c0def7e..b93eabbd 100644 --- a/src/Database/Concerns/BelongsToTenant.php +++ b/src/Database/Concerns/BelongsToTenant.php @@ -23,10 +23,9 @@ trait BelongsToTenant { // The queries performed for models present in the tenancy.models.rls are scoped using Postgres RLS instead of the global scope if (! in_array(static::class, config('tenancy.models.rls'))) { - static::addGlobalScope(new TenantScope); + static::addGlobalScope(new TenantScope); } - static::creating(function ($model) { if (! $model->getAttribute(Tenancy::tenantKeyColumn()) && ! $model->relationLoaded('tenant')) { if (tenancy()->initialized) { diff --git a/src/TenancyServiceProvider.php b/src/TenancyServiceProvider.php index bc11a474..24f8fa1b 100644 --- a/src/TenancyServiceProvider.php +++ b/src/TenancyServiceProvider.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Stancl\Tenancy; use Illuminate\Cache\CacheManager; +use Illuminate\Database\Console\Migrations\FreshCommand; +use Illuminate\Support\ServiceProvider; +use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper; use Stancl\Tenancy\Contracts\Domain; use Stancl\Tenancy\Contracts\Tenant; -use Illuminate\Support\ServiceProvider; use Stancl\Tenancy\Resolvers\DomainTenantResolver; -use Illuminate\Database\Console\Migrations\FreshCommand; -use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper; class TenancyServiceProvider extends ServiceProvider {