mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 22:14:03 +00:00
Apply fixes from StyleCI
This commit is contained in:
parent
98cb49b1c0
commit
362aaf4764
5 changed files with 16 additions and 7 deletions
|
|
@ -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?
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Traits;
|
||||
|
||||
trait HasArrayAccess
|
||||
|
|
@ -23,4 +25,4 @@ trait HasArrayAccess
|
|||
{
|
||||
unset($this->$offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue