1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 16:34:04 +00:00

Fix code style (php-cs-fixer)

This commit is contained in:
PHP CS Fixer 2023-05-09 14:07:40 +00:00
parent 17d779e130
commit 4f9147bf81
3 changed files with 6 additions and 7 deletions

View file

@ -4,10 +4,10 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Bootstrappers\Integrations; namespace Stancl\Tenancy\Bootstrappers\Integrations;
use Stancl\Tenancy\Contracts\Tenant;
use Illuminate\Database\DatabaseManager;
use Illuminate\Contracts\Config\Repository; use Illuminate\Contracts\Config\Repository;
use Illuminate\Database\DatabaseManager;
use Stancl\Tenancy\Contracts\TenancyBootstrapper; use Stancl\Tenancy\Contracts\TenancyBootstrapper;
use Stancl\Tenancy\Contracts\Tenant;
class PostgresTenancyBootstrapper implements TenancyBootstrapper class PostgresTenancyBootstrapper implements TenancyBootstrapper
{ {

View file

@ -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 // 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'))) { if (! in_array(static::class, config('tenancy.models.rls'))) {
static::addGlobalScope(new TenantScope); static::addGlobalScope(new TenantScope);
} }
static::creating(function ($model) { static::creating(function ($model) {
if (! $model->getAttribute(Tenancy::tenantKeyColumn()) && ! $model->relationLoaded('tenant')) { if (! $model->getAttribute(Tenancy::tenantKeyColumn()) && ! $model->relationLoaded('tenant')) {
if (tenancy()->initialized) { if (tenancy()->initialized) {

View file

@ -5,12 +5,12 @@ declare(strict_types=1);
namespace Stancl\Tenancy; namespace Stancl\Tenancy;
use Illuminate\Cache\CacheManager; 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\Domain;
use Stancl\Tenancy\Contracts\Tenant; use Stancl\Tenancy\Contracts\Tenant;
use Illuminate\Support\ServiceProvider;
use Stancl\Tenancy\Resolvers\DomainTenantResolver; use Stancl\Tenancy\Resolvers\DomainTenantResolver;
use Illuminate\Database\Console\Migrations\FreshCommand;
use Stancl\Tenancy\Bootstrappers\FilesystemTenancyBootstrapper;
class TenancyServiceProvider extends ServiceProvider class TenancyServiceProvider extends ServiceProvider
{ {