mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 15:14:04 +00:00
php-cs-fixer
This commit is contained in:
parent
147b2fe3c0
commit
abbeae3072
12 changed files with 15 additions and 13 deletions
|
|
@ -63,6 +63,7 @@
|
|||
"docker-m1": "ln -s docker-compose-m1.override.yml docker-compose.override.yml",
|
||||
"coverage": "open coverage/phpunit/html/index.html",
|
||||
"phpstan": "vendor/bin/phpstan",
|
||||
"cs": "php-cs-fixer fix --config=.php-cs-fixer.php",
|
||||
"test": "PHP_VERSION=8.1 ./test --no-coverage",
|
||||
"test-full": "PHP_VERSION=8.1 ./test"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Down extends DownCommand
|
|||
{
|
||||
use HasATenantsOption;
|
||||
|
||||
protected $signature = 'tenants:down
|
||||
protected $signature = 'tenants:down
|
||||
{--redirect= : The path that users should be redirected to}
|
||||
{--retry= : The number of seconds after which the request may be retried}
|
||||
{--refresh= : The number of seconds after which the browser may refresh}
|
||||
|
|
@ -29,7 +29,7 @@ class Down extends DownCommand
|
|||
$payload = $this->getDownDatabasePayload();
|
||||
|
||||
// This runs for all tenants if no --tenants are specified
|
||||
tenancy()->runForMultiple($this->option('tenants'), function ($tenant) use ($payload){
|
||||
tenancy()->runForMultiple($this->option('tenants'), function ($tenant) use ($payload) {
|
||||
$this->line("Tenant: {$tenant['id']}");
|
||||
$tenant->putDownForMaintenance($payload);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ trait MaintenanceMode
|
|||
'refresh' => $data['refresh'] ?? null,
|
||||
'secret' => $data['secret'] ?? null,
|
||||
'status' => $data['status'] ?? 503,
|
||||
]
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use Stancl\Tenancy\Database\Contracts\TenantWithDatabase as Tenant;
|
|||
class DatabaseConfig
|
||||
{
|
||||
/** The tenant whose database we're dealing with. */
|
||||
public Tenant&Model $tenant;
|
||||
public Tenant & Model $tenant;
|
||||
|
||||
/** Database username generator (can be set by the developer.) */
|
||||
public static Closure|null $usernameGenerator = null;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
|||
|
||||
class SyncedResourceSaved
|
||||
{
|
||||
public Syncable&Model $model;
|
||||
public Syncable & Model $model;
|
||||
|
||||
/** @var (TenantWithDatabase&Model)|null */
|
||||
public TenantWithDatabase|null $tenant;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class CreateDatabase implements ShouldQueue
|
|||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public function __construct(
|
||||
protected TenantWithDatabase&Model $tenant,
|
||||
protected TenantWithDatabase & Model $tenant,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ class CreateStorageSymlinks implements ShouldQueue
|
|||
|
||||
public function __construct(
|
||||
public Tenant $tenant,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class DeleteDatabase implements ShouldQueue
|
|||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public function __construct(
|
||||
protected TenantWithDatabase&Model $tenant,
|
||||
protected TenantWithDatabase & Model $tenant,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ class DeleteDomains
|
|||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
protected TenantWithDatabase&Model $tenant;
|
||||
protected TenantWithDatabase & Model $tenant;
|
||||
|
||||
public function __construct(TenantWithDatabase&Model $tenant)
|
||||
public function __construct(TenantWithDatabase & Model $tenant)
|
||||
{
|
||||
$this->tenant = $tenant;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class MigrateDatabase implements ShouldQueue
|
|||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public function __construct(
|
||||
protected TenantWithDatabase&Model $tenant,
|
||||
protected TenantWithDatabase & Model $tenant,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class SeedDatabase implements ShouldQueue
|
|||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public function __construct(
|
||||
protected TenantWithDatabase&Model $tenant,
|
||||
protected TenantWithDatabase & Model $tenant,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class Tenancy
|
|||
return static::model()->query();
|
||||
}
|
||||
|
||||
public static function model(): Tenant&Model
|
||||
public static function model(): Tenant & Model
|
||||
{
|
||||
$class = config('tenancy.tenant_model');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue