mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 15:24:03 +00:00
Fix code style (php-cs-fixer)
This commit is contained in:
parent
fbd1e02564
commit
fc6a931a32
2 changed files with 3 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||||
namespace Stancl\Tenancy\Bootstrappers;
|
namespace Stancl\Tenancy\Bootstrappers;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
|
use Stancl\Tenancy\Contracts\TenancyBootstrapper;
|
||||||
|
|
@ -12,7 +13,6 @@ use Stancl\Tenancy\Contracts\Tenant;
|
||||||
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
||||||
use Stancl\Tenancy\Database\DatabaseManager;
|
use Stancl\Tenancy\Database\DatabaseManager;
|
||||||
use Stancl\Tenancy\Database\Exceptions\TenantDatabaseDoesNotExistException;
|
use Stancl\Tenancy\Database\Exceptions\TenantDatabaseDoesNotExistException;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
class DatabaseTenancyBootstrapper implements TenancyBootstrapper
|
class DatabaseTenancyBootstrapper implements TenancyBootstrapper
|
||||||
{
|
{
|
||||||
|
|
@ -68,7 +68,7 @@ class DatabaseTenancyBootstrapper implements TenancyBootstrapper
|
||||||
if ($tenant::where($tenant->getTenantKeyName(), '!=', $tenant->getTenantKey())
|
if ($tenant::where($tenant->getTenantKeyName(), '!=', $tenant->getTenantKey())
|
||||||
->where('data->tenancy_db_name', $dbName)
|
->where('data->tenancy_db_name', $dbName)
|
||||||
->exists()) {
|
->exists()) {
|
||||||
throw new RuntimeException("Tenant cannot use a database of another tenant.");
|
throw new RuntimeException('Tenant cannot use a database of another tenant.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the current database doesn't have the tenants table (i.e. it's not the central database)
|
// Check if the current database doesn't have the tenants table (i.e. it's not the central database)
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ trait ValidatesDatabaseParameters
|
||||||
$this->validateParameter($filename, static::allowedFilenameCharacters());
|
$this->validateParameter($filename, static::allowedFilenameCharacters());
|
||||||
|
|
||||||
if ($filename === '') {
|
if ($filename === '') {
|
||||||
throw new InvalidArgumentException("Filename cannot be empty.");
|
throw new InvalidArgumentException('Filename cannot be empty.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_dir($filename)) {
|
if (is_dir($filename)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue