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

Apply fixes from StyleCI

This commit is contained in:
stancl 2019-09-05 17:27:32 +00:00 committed by StyleCI Bot
parent 98cb49b1c0
commit 362aaf4764
5 changed files with 16 additions and 7 deletions

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Contracts;
use Stancl\Tenancy\Tenant;
@ -7,5 +9,6 @@ use Stancl\Tenancy\Tenant;
interface TenancyBootstrapper
{
public function start(Tenant $tenant); // todo better name?
public function end(Tenant $tenant); // todo arg?
}
}

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy;
use Illuminate\Database\DatabaseManager as BaseDatabaseManager;
@ -48,4 +50,4 @@ class DatabaseManagerv2
$this->database->reconnect($connection);
$this->database->setDefaultConnection($connection);
}
}
}

View file

@ -1,10 +1,12 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\TenancyBoostrappers;
use Stancl\Tenancy\DatabaseManager;
use Illuminate\Foundation\Application;
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
use Stancl\Tenancy\DatabaseManager;
class DatabaseTenancyBootstrapper implements TenancyBootstrapper
{
@ -29,4 +31,4 @@ class DatabaseTenancyBootstrapper implements TenancyBootstrapper
{
$this->database->reconnect();
}
}
}

View file

@ -48,13 +48,13 @@ class TenantManagerv2
{
$this->bootstrapTenancy($tenant);
$this->setTenant($tenant);
return $this;
}
public function bootstrapTenancy(Tenant $tenant): self
{
foreach($this->tenancyBootstrappers() as $bootstrapper) {
foreach ($this->tenancyBootstrappers() as $bootstrapper) {
$bootstrapper::start($tenant);
}

View file

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Traits;
trait HasArrayAccess
@ -23,4 +25,4 @@ trait HasArrayAccess
{
unset($this->$offset);
}
}
}