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

Apply fixes from StyleCI

This commit is contained in:
stancl 2019-09-06 16:52:16 +00:00 committed by StyleCI Bot
parent 5d2b1e3a72
commit 73124cd801
6 changed files with 18 additions and 8 deletions

View file

@ -56,7 +56,7 @@ return [
'pgsql' => 'Stancl\Tenancy\TenantDatabaseManagers\PostgreSQLDatabaseManager', 'pgsql' => 'Stancl\Tenancy\TenantDatabaseManagers\PostgreSQLDatabaseManager',
], ],
'tenancy_bootstrappers' => [ 'tenancy_bootstrappers' => [
'' '',
], ],
'queue_database_creation' => false, 'queue_database_creation' => false,
'queue_database_deletion' => false, 'queue_database_deletion' => false,

View file

@ -1,6 +1,10 @@
<?php <?php
declare(strict_types=1);
namespace Stancl\Tenancy\Contracts; namespace Stancl\Tenancy\Contracts;
/** Empty interface implemented by Stancl\Tenancy\Tenant have a dependency-injectable contract for the current tenant. */ /** Empty interface implemented by Stancl\Tenancy\Tenant have a dependency-injectable contract for the current tenant. */
interface Tenant {} interface Tenant
{
}

View file

@ -1,10 +1,12 @@
<?php <?php
declare(strict_types=1);
namespace Stancl\Tenancy\TenancyBoostrappers; namespace Stancl\Tenancy\TenancyBoostrappers;
use Stancl\Tenancy\Contracts\TenancyBootstrapper; use Stancl\Tenancy\Contracts\TenancyBootstrapper;
class CacheTenancyBootstrapped implements TenancyBootstrapper class CacheTenancyBoostrapper implements TenancyBootstrapper
{ {
/** @var \Illuminate\Cache\CacheManager */ /** @var \Illuminate\Cache\CacheManager */
protected $originalCache; protected $originalCache;
@ -23,4 +25,4 @@ class CacheTenancyBootstrapped implements TenancyBootstrapper
return $this->originalCache; return $this->originalCache;
}); });
} }
} }

View file

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace Stancl\Tenancy\TenancyBoostrappers; namespace Stancl\Tenancy\TenancyBoostrappers;
use Stancl\Tenancy\Contracts\TenancyBootstrapper; use Stancl\Tenancy\Contracts\TenancyBootstrapper;
@ -54,4 +56,4 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
Storage::disk($disk)->getAdapter()->setPathPrefix($this->originalPaths['disks'][$disk]); Storage::disk($disk)->getAdapter()->setPathPrefix($this->originalPaths['disks'][$disk]);
} }
} }
} }

View file

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
namespace Stancl\Tenancy\TenantDatabaseManagers; namespace Stancl\Tenancy\TenantDatabaseManagers;
use Stancl\Tenancy\Contracts\TenancyBootstrapper; use Stancl\Tenancy\Contracts\TenancyBootstrapper;
@ -41,4 +43,4 @@ class RedisTenancyBootstrapper implements TenancyBootstrapper
{ {
return config('tenancy.redis.prefixed_connections'); return config('tenancy.redis.prefixed_connections');
} }
} }

View file

@ -54,7 +54,7 @@ class TenantManagerv2
public function bootstrapTenancy(Tenant $tenant): self public function bootstrapTenancy(Tenant $tenant): self
{ {
foreach($this->tenancyBootstrappers() as $bootstrapper) { foreach ($this->tenancyBootstrappers() as $bootstrapper) {
$this->app[$bootstrapper]->start($tenant); $this->app[$bootstrapper]->start($tenant);
} }
@ -63,7 +63,7 @@ class TenantManagerv2
public function endTenancy(): self public function endTenancy(): self
{ {
foreach($this->tenancyBootstrappers() as $bootstrapper) { foreach ($this->tenancyBootstrappers() as $bootstrapper) {
$this->app[$bootstrapper]->end(); $this->app[$bootstrapper]->end();
} }