From 1d80604cff0fe756b8e6ae08d60272d002e977d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Tue, 2 Apr 2024 04:31:03 +0200 Subject: [PATCH] Enable single_line_empty_body phpcsfixer rule --- .php-cs-fixer.php | 1 + src/Actions/CloneRoutesAsTenant.php | 3 +-- src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php | 3 +-- src/Bootstrappers/CacheTagsBootstrapper.php | 3 +-- src/Bootstrappers/CacheTenancyBootstrapper.php | 3 +-- src/Bootstrappers/DatabaseSessionBootstrapper.php | 3 +-- src/Bootstrappers/Integrations/FortifyRouteBootstrapper.php | 3 +-- src/Bootstrappers/Integrations/ScoutPrefixBootstrapper.php | 3 +-- src/Bootstrappers/JobBatchBootstrapper.php | 3 +-- src/Bootstrappers/RootUrlBootstrapper.php | 3 +-- src/Bootstrappers/UrlGeneratorBootstrapper.php | 3 +-- src/Contracts/SingleDomainTenant.php | 4 +--- src/Database/DatabaseManager.php | 3 +-- src/Events/BootstrappingTenancy.php | 4 +--- src/Events/Contracts/TenancyEvent.php | 3 +-- src/Events/CreatingDatabase.php | 4 +--- src/Events/CreatingDomain.php | 4 +--- src/Events/CreatingPendingTenant.php | 4 +--- src/Events/CreatingStorageSymlink.php | 4 +--- src/Events/CreatingTenant.php | 4 +--- src/Events/DatabaseCreated.php | 4 +--- src/Events/DatabaseDeleted.php | 4 +--- src/Events/DatabaseMigrated.php | 4 +--- src/Events/DatabaseRolledBack.php | 4 +--- src/Events/DatabaseSeeded.php | 4 +--- src/Events/DeletingDatabase.php | 4 +--- src/Events/DeletingDomain.php | 4 +--- src/Events/DeletingTenant.php | 4 +--- src/Events/DomainCreated.php | 4 +--- src/Events/DomainDeleted.php | 4 +--- src/Events/DomainSaved.php | 4 +--- src/Events/DomainUpdated.php | 4 +--- src/Events/EndingTenancy.php | 4 +--- src/Events/InitializingTenancy.php | 4 +--- src/Events/MigratingDatabase.php | 4 +--- src/Events/PendingTenantCreated.php | 4 +--- src/Events/PendingTenantPulled.php | 4 +--- src/Events/PullingPendingTenant.php | 4 +--- src/Events/RemovingStorageSymlink.php | 4 +--- src/Events/RevertedToCentralContext.php | 4 +--- src/Events/RevertingToCentralContext.php | 4 +--- src/Events/RollingBackDatabase.php | 4 +--- src/Events/SavedDomain.php | 4 +--- src/Events/SavedTenant.php | 4 +--- src/Events/SavingDomain.php | 4 +--- src/Events/SavingTenant.php | 4 +--- src/Events/SeedingDatabase.php | 4 +--- src/Events/StorageSymlinkCreated.php | 4 +--- src/Events/StorageSymlinkRemoved.php | 4 +--- src/Events/TenancyBootstrapped.php | 4 +--- src/Events/TenancyEnded.php | 4 +--- src/Events/TenancyInitialized.php | 4 +--- src/Events/TenantCreated.php | 4 +--- src/Events/TenantDeleted.php | 4 +--- src/Events/TenantSaved.php | 4 +--- src/Events/TenantUpdated.php | 4 +--- src/Events/UpdatingDomain.php | 4 +--- src/Events/UpdatingTenant.php | 4 +--- src/Features/TenantConfig.php | 3 +-- src/Jobs/CreateDatabase.php | 3 +-- src/Jobs/CreateStorageSymlinks.php | 3 +-- src/Jobs/DeleteDatabase.php | 3 +-- src/Jobs/MigrateDatabase.php | 3 +-- src/Jobs/SeedDatabase.php | 3 +-- src/Listeners/CreateTenantConnection.php | 3 +-- src/Listeners/UseCentralConnection.php | 3 +-- src/Listeners/UseTenantConnection.php | 3 +-- src/Middleware/InitializeTenancyByDomain.php | 3 +-- src/Middleware/InitializeTenancyByPath.php | 3 +-- src/Middleware/InitializeTenancyByRequestData.php | 3 +-- src/Resolvers/Contracts/CachedTenantResolver.php | 4 +--- .../Events/CentralResourceAttachedToTenant.php | 3 +-- .../Events/CentralResourceDetachedFromTenant.php | 3 +-- src/ResourceSyncing/Events/SyncMasterDeleted.php | 3 +-- src/ResourceSyncing/Events/SyncMasterRestored.php | 3 +-- src/ResourceSyncing/Events/SyncedResourceSaved.php | 3 +-- .../Events/SyncedResourceSavedInForeignDatabase.php | 3 +-- 77 files changed, 77 insertions(+), 198 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 7e649ea5..e168d676 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -4,6 +4,7 @@ use PhpCsFixer\Config; use PhpCsFixer\Finder; $rules = [ + 'single_line_empty_body' => true, 'array_syntax' => ['syntax' => 'short'], 'binary_operator_spaces' => [ 'default' => 'single_space', diff --git a/src/Actions/CloneRoutesAsTenant.php b/src/Actions/CloneRoutesAsTenant.php index 4f099782..08cb3966 100644 --- a/src/Actions/CloneRoutesAsTenant.php +++ b/src/Actions/CloneRoutesAsTenant.php @@ -44,8 +44,7 @@ class CloneRoutesAsTenant public function __construct( protected Router $router, - ) { - } + ) {} public function handle(): void { diff --git a/src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php b/src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php index 9a6f588e..0c01dfc9 100644 --- a/src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php +++ b/src/Bootstrappers/BroadcastChannelPrefixBootstrapper.php @@ -37,8 +37,7 @@ class BroadcastChannelPrefixBootstrapper implements TenancyBootstrapper public function __construct( protected Application $app, protected BroadcastManager $broadcastManager, - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Bootstrappers/CacheTagsBootstrapper.php b/src/Bootstrappers/CacheTagsBootstrapper.php index 2c59ab1e..ae587c25 100644 --- a/src/Bootstrappers/CacheTagsBootstrapper.php +++ b/src/Bootstrappers/CacheTagsBootstrapper.php @@ -23,8 +23,7 @@ class CacheTagsBootstrapper implements TenancyBootstrapper public function __construct( protected Application $app - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Bootstrappers/CacheTenancyBootstrapper.php b/src/Bootstrappers/CacheTenancyBootstrapper.php index a6084a80..35e65010 100644 --- a/src/Bootstrappers/CacheTenancyBootstrapper.php +++ b/src/Bootstrappers/CacheTenancyBootstrapper.php @@ -24,8 +24,7 @@ class CacheTenancyBootstrapper implements TenancyBootstrapper public function __construct( protected ConfigRepository $config, protected CacheManager $cacheManager, - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Bootstrappers/DatabaseSessionBootstrapper.php b/src/Bootstrappers/DatabaseSessionBootstrapper.php index 467eaa2f..41f95536 100644 --- a/src/Bootstrappers/DatabaseSessionBootstrapper.php +++ b/src/Bootstrappers/DatabaseSessionBootstrapper.php @@ -23,8 +23,7 @@ class DatabaseSessionBootstrapper implements TenancyBootstrapper protected Repository $config, protected Container $container, protected SessionManager $session, - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Bootstrappers/Integrations/FortifyRouteBootstrapper.php b/src/Bootstrappers/Integrations/FortifyRouteBootstrapper.php index e2290c67..80c48ed1 100644 --- a/src/Bootstrappers/Integrations/FortifyRouteBootstrapper.php +++ b/src/Bootstrappers/Integrations/FortifyRouteBootstrapper.php @@ -60,8 +60,7 @@ class FortifyRouteBootstrapper implements TenancyBootstrapper public function __construct( protected Repository $config, - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Bootstrappers/Integrations/ScoutPrefixBootstrapper.php b/src/Bootstrappers/Integrations/ScoutPrefixBootstrapper.php index bb5e9b6d..d9e19aa0 100644 --- a/src/Bootstrappers/Integrations/ScoutPrefixBootstrapper.php +++ b/src/Bootstrappers/Integrations/ScoutPrefixBootstrapper.php @@ -14,8 +14,7 @@ class ScoutPrefixBootstrapper implements TenancyBootstrapper public function __construct( protected Repository $config, - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Bootstrappers/JobBatchBootstrapper.php b/src/Bootstrappers/JobBatchBootstrapper.php index 845575a0..3ccf3b97 100644 --- a/src/Bootstrappers/JobBatchBootstrapper.php +++ b/src/Bootstrappers/JobBatchBootstrapper.php @@ -23,8 +23,7 @@ class JobBatchBootstrapper implements TenancyBootstrapper public function __construct( protected DatabaseBatchRepository $batchRepository, protected DatabaseManager $databaseManager - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Bootstrappers/RootUrlBootstrapper.php b/src/Bootstrappers/RootUrlBootstrapper.php index e475fc54..08142e0f 100644 --- a/src/Bootstrappers/RootUrlBootstrapper.php +++ b/src/Bootstrappers/RootUrlBootstrapper.php @@ -18,8 +18,7 @@ class RootUrlBootstrapper implements TenancyBootstrapper public function __construct( protected UrlGenerator $urlGenerator, protected Repository $config, - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Bootstrappers/UrlGeneratorBootstrapper.php b/src/Bootstrappers/UrlGeneratorBootstrapper.php index 73ec1f0b..e3bb4a99 100644 --- a/src/Bootstrappers/UrlGeneratorBootstrapper.php +++ b/src/Bootstrappers/UrlGeneratorBootstrapper.php @@ -26,8 +26,7 @@ class UrlGeneratorBootstrapper implements TenancyBootstrapper public function __construct( protected Application $app, protected UrlGenerator $originalUrlGenerator, - ) { - } + ) {} public function bootstrap(Tenant $tenant): void { diff --git a/src/Contracts/SingleDomainTenant.php b/src/Contracts/SingleDomainTenant.php index d0e84e3d..ca97ab3e 100644 --- a/src/Contracts/SingleDomainTenant.php +++ b/src/Contracts/SingleDomainTenant.php @@ -7,6 +7,4 @@ namespace Stancl\Tenancy\Contracts; /** * @property string|null $domain */ -interface SingleDomainTenant extends Tenant -{ -} +interface SingleDomainTenant extends Tenant {} diff --git a/src/Database/DatabaseManager.php b/src/Database/DatabaseManager.php index ce9219d5..edde7515 100644 --- a/src/Database/DatabaseManager.php +++ b/src/Database/DatabaseManager.php @@ -19,8 +19,7 @@ class DatabaseManager protected Application $app, protected BaseDatabaseManager $database, protected Repository $config, - ) { - } + ) {} /** Connect to a tenant's database. */ public function connectToTenant(TenantWithDatabase $tenant): void diff --git a/src/Events/BootstrappingTenancy.php b/src/Events/BootstrappingTenancy.php index 5d55657c..c7686aa1 100644 --- a/src/Events/BootstrappingTenancy.php +++ b/src/Events/BootstrappingTenancy.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class BootstrappingTenancy extends Contracts\TenancyEvent -{ -} +class BootstrappingTenancy extends Contracts\TenancyEvent {} diff --git a/src/Events/Contracts/TenancyEvent.php b/src/Events/Contracts/TenancyEvent.php index 85b793f5..9a85085d 100644 --- a/src/Events/Contracts/TenancyEvent.php +++ b/src/Events/Contracts/TenancyEvent.php @@ -10,6 +10,5 @@ abstract class TenancyEvent { public function __construct( public Tenancy $tenancy, - ) { - } + ) {} } diff --git a/src/Events/CreatingDatabase.php b/src/Events/CreatingDatabase.php index b55e343e..9db72d1b 100644 --- a/src/Events/CreatingDatabase.php +++ b/src/Events/CreatingDatabase.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class CreatingDatabase extends Contracts\TenantEvent -{ -} +class CreatingDatabase extends Contracts\TenantEvent {} diff --git a/src/Events/CreatingDomain.php b/src/Events/CreatingDomain.php index db0d15c3..fd98c1a6 100644 --- a/src/Events/CreatingDomain.php +++ b/src/Events/CreatingDomain.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class CreatingDomain extends Contracts\DomainEvent -{ -} +class CreatingDomain extends Contracts\DomainEvent {} diff --git a/src/Events/CreatingPendingTenant.php b/src/Events/CreatingPendingTenant.php index dfbe6c70..560db44f 100644 --- a/src/Events/CreatingPendingTenant.php +++ b/src/Events/CreatingPendingTenant.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class CreatingPendingTenant extends Contracts\TenantEvent -{ -} +class CreatingPendingTenant extends Contracts\TenantEvent {} diff --git a/src/Events/CreatingStorageSymlink.php b/src/Events/CreatingStorageSymlink.php index 13937174..128642fa 100644 --- a/src/Events/CreatingStorageSymlink.php +++ b/src/Events/CreatingStorageSymlink.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class CreatingStorageSymlink extends Contracts\TenantEvent -{ -} +class CreatingStorageSymlink extends Contracts\TenantEvent {} diff --git a/src/Events/CreatingTenant.php b/src/Events/CreatingTenant.php index 4fe8965d..7a040911 100644 --- a/src/Events/CreatingTenant.php +++ b/src/Events/CreatingTenant.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class CreatingTenant extends Contracts\TenantEvent -{ -} +class CreatingTenant extends Contracts\TenantEvent {} diff --git a/src/Events/DatabaseCreated.php b/src/Events/DatabaseCreated.php index 6fd16991..11eaaca8 100644 --- a/src/Events/DatabaseCreated.php +++ b/src/Events/DatabaseCreated.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DatabaseCreated extends Contracts\TenantEvent -{ -} +class DatabaseCreated extends Contracts\TenantEvent {} diff --git a/src/Events/DatabaseDeleted.php b/src/Events/DatabaseDeleted.php index 079284b0..0a9e30fa 100644 --- a/src/Events/DatabaseDeleted.php +++ b/src/Events/DatabaseDeleted.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DatabaseDeleted extends Contracts\TenantEvent -{ -} +class DatabaseDeleted extends Contracts\TenantEvent {} diff --git a/src/Events/DatabaseMigrated.php b/src/Events/DatabaseMigrated.php index 0b638256..13643623 100644 --- a/src/Events/DatabaseMigrated.php +++ b/src/Events/DatabaseMigrated.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DatabaseMigrated extends Contracts\TenantEvent -{ -} +class DatabaseMigrated extends Contracts\TenantEvent {} diff --git a/src/Events/DatabaseRolledBack.php b/src/Events/DatabaseRolledBack.php index 0f82e4a7..390217c2 100644 --- a/src/Events/DatabaseRolledBack.php +++ b/src/Events/DatabaseRolledBack.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DatabaseRolledBack extends Contracts\TenantEvent -{ -} +class DatabaseRolledBack extends Contracts\TenantEvent {} diff --git a/src/Events/DatabaseSeeded.php b/src/Events/DatabaseSeeded.php index 0104329e..aab03d93 100644 --- a/src/Events/DatabaseSeeded.php +++ b/src/Events/DatabaseSeeded.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DatabaseSeeded extends Contracts\TenantEvent -{ -} +class DatabaseSeeded extends Contracts\TenantEvent {} diff --git a/src/Events/DeletingDatabase.php b/src/Events/DeletingDatabase.php index 909661aa..e3da98cc 100644 --- a/src/Events/DeletingDatabase.php +++ b/src/Events/DeletingDatabase.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DeletingDatabase extends Contracts\TenantEvent -{ -} +class DeletingDatabase extends Contracts\TenantEvent {} diff --git a/src/Events/DeletingDomain.php b/src/Events/DeletingDomain.php index 6053f1da..030a407b 100644 --- a/src/Events/DeletingDomain.php +++ b/src/Events/DeletingDomain.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DeletingDomain extends Contracts\DomainEvent -{ -} +class DeletingDomain extends Contracts\DomainEvent {} diff --git a/src/Events/DeletingTenant.php b/src/Events/DeletingTenant.php index f2b7626f..a094f646 100644 --- a/src/Events/DeletingTenant.php +++ b/src/Events/DeletingTenant.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DeletingTenant extends Contracts\TenantEvent -{ -} +class DeletingTenant extends Contracts\TenantEvent {} diff --git a/src/Events/DomainCreated.php b/src/Events/DomainCreated.php index 241e6691..8702dac2 100644 --- a/src/Events/DomainCreated.php +++ b/src/Events/DomainCreated.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DomainCreated extends Contracts\DomainEvent -{ -} +class DomainCreated extends Contracts\DomainEvent {} diff --git a/src/Events/DomainDeleted.php b/src/Events/DomainDeleted.php index f1bbda08..d1bd5c11 100644 --- a/src/Events/DomainDeleted.php +++ b/src/Events/DomainDeleted.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DomainDeleted extends Contracts\DomainEvent -{ -} +class DomainDeleted extends Contracts\DomainEvent {} diff --git a/src/Events/DomainSaved.php b/src/Events/DomainSaved.php index c15be19f..7c90f8e3 100644 --- a/src/Events/DomainSaved.php +++ b/src/Events/DomainSaved.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DomainSaved extends Contracts\DomainEvent -{ -} +class DomainSaved extends Contracts\DomainEvent {} diff --git a/src/Events/DomainUpdated.php b/src/Events/DomainUpdated.php index 85443058..ccc93fdd 100644 --- a/src/Events/DomainUpdated.php +++ b/src/Events/DomainUpdated.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class DomainUpdated extends Contracts\DomainEvent -{ -} +class DomainUpdated extends Contracts\DomainEvent {} diff --git a/src/Events/EndingTenancy.php b/src/Events/EndingTenancy.php index 8ead3091..e97687f3 100644 --- a/src/Events/EndingTenancy.php +++ b/src/Events/EndingTenancy.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class EndingTenancy extends Contracts\TenancyEvent -{ -} +class EndingTenancy extends Contracts\TenancyEvent {} diff --git a/src/Events/InitializingTenancy.php b/src/Events/InitializingTenancy.php index a8aa5039..6cada7ac 100644 --- a/src/Events/InitializingTenancy.php +++ b/src/Events/InitializingTenancy.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class InitializingTenancy extends Contracts\TenancyEvent -{ -} +class InitializingTenancy extends Contracts\TenancyEvent {} diff --git a/src/Events/MigratingDatabase.php b/src/Events/MigratingDatabase.php index 1da35967..f7cace5a 100644 --- a/src/Events/MigratingDatabase.php +++ b/src/Events/MigratingDatabase.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class MigratingDatabase extends Contracts\TenantEvent -{ -} +class MigratingDatabase extends Contracts\TenantEvent {} diff --git a/src/Events/PendingTenantCreated.php b/src/Events/PendingTenantCreated.php index f75f1a8e..2bc8ab0c 100644 --- a/src/Events/PendingTenantCreated.php +++ b/src/Events/PendingTenantCreated.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class PendingTenantCreated extends Contracts\TenantEvent -{ -} +class PendingTenantCreated extends Contracts\TenantEvent {} diff --git a/src/Events/PendingTenantPulled.php b/src/Events/PendingTenantPulled.php index b60740f4..3e0b973d 100644 --- a/src/Events/PendingTenantPulled.php +++ b/src/Events/PendingTenantPulled.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class PendingTenantPulled extends Contracts\TenantEvent -{ -} +class PendingTenantPulled extends Contracts\TenantEvent {} diff --git a/src/Events/PullingPendingTenant.php b/src/Events/PullingPendingTenant.php index 2997c107..f823bb17 100644 --- a/src/Events/PullingPendingTenant.php +++ b/src/Events/PullingPendingTenant.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class PullingPendingTenant extends Contracts\TenantEvent -{ -} +class PullingPendingTenant extends Contracts\TenantEvent {} diff --git a/src/Events/RemovingStorageSymlink.php b/src/Events/RemovingStorageSymlink.php index 24f60e0e..35462d21 100644 --- a/src/Events/RemovingStorageSymlink.php +++ b/src/Events/RemovingStorageSymlink.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class RemovingStorageSymlink extends Contracts\TenantEvent -{ -} +class RemovingStorageSymlink extends Contracts\TenantEvent {} diff --git a/src/Events/RevertedToCentralContext.php b/src/Events/RevertedToCentralContext.php index ffb767d7..f8387c6a 100644 --- a/src/Events/RevertedToCentralContext.php +++ b/src/Events/RevertedToCentralContext.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class RevertedToCentralContext extends Contracts\TenancyEvent -{ -} +class RevertedToCentralContext extends Contracts\TenancyEvent {} diff --git a/src/Events/RevertingToCentralContext.php b/src/Events/RevertingToCentralContext.php index 9de067ef..008c4671 100644 --- a/src/Events/RevertingToCentralContext.php +++ b/src/Events/RevertingToCentralContext.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class RevertingToCentralContext extends Contracts\TenancyEvent -{ -} +class RevertingToCentralContext extends Contracts\TenancyEvent {} diff --git a/src/Events/RollingBackDatabase.php b/src/Events/RollingBackDatabase.php index 6f5525dc..8dc661dc 100644 --- a/src/Events/RollingBackDatabase.php +++ b/src/Events/RollingBackDatabase.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class RollingBackDatabase extends Contracts\TenantEvent -{ -} +class RollingBackDatabase extends Contracts\TenantEvent {} diff --git a/src/Events/SavedDomain.php b/src/Events/SavedDomain.php index a7bb6a05..dc3c94a6 100644 --- a/src/Events/SavedDomain.php +++ b/src/Events/SavedDomain.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class SavedDomain extends Contracts\DomainEvent -{ -} +class SavedDomain extends Contracts\DomainEvent {} diff --git a/src/Events/SavedTenant.php b/src/Events/SavedTenant.php index a8a538bc..366820e0 100644 --- a/src/Events/SavedTenant.php +++ b/src/Events/SavedTenant.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class SavedTenant extends Contracts\TenantEvent -{ -} +class SavedTenant extends Contracts\TenantEvent {} diff --git a/src/Events/SavingDomain.php b/src/Events/SavingDomain.php index 188d4c7c..b7ead4c0 100644 --- a/src/Events/SavingDomain.php +++ b/src/Events/SavingDomain.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class SavingDomain extends Contracts\DomainEvent -{ -} +class SavingDomain extends Contracts\DomainEvent {} diff --git a/src/Events/SavingTenant.php b/src/Events/SavingTenant.php index a956ba94..f3a2cb5a 100644 --- a/src/Events/SavingTenant.php +++ b/src/Events/SavingTenant.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class SavingTenant extends Contracts\TenantEvent -{ -} +class SavingTenant extends Contracts\TenantEvent {} diff --git a/src/Events/SeedingDatabase.php b/src/Events/SeedingDatabase.php index 1aa8b78a..935a5895 100644 --- a/src/Events/SeedingDatabase.php +++ b/src/Events/SeedingDatabase.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class SeedingDatabase extends Contracts\TenantEvent -{ -} +class SeedingDatabase extends Contracts\TenantEvent {} diff --git a/src/Events/StorageSymlinkCreated.php b/src/Events/StorageSymlinkCreated.php index 32555686..d67406aa 100644 --- a/src/Events/StorageSymlinkCreated.php +++ b/src/Events/StorageSymlinkCreated.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class StorageSymlinkCreated extends Contracts\TenantEvent -{ -} +class StorageSymlinkCreated extends Contracts\TenantEvent {} diff --git a/src/Events/StorageSymlinkRemoved.php b/src/Events/StorageSymlinkRemoved.php index 9bf067cd..d300f7da 100644 --- a/src/Events/StorageSymlinkRemoved.php +++ b/src/Events/StorageSymlinkRemoved.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class StorageSymlinkRemoved extends Contracts\TenantEvent -{ -} +class StorageSymlinkRemoved extends Contracts\TenantEvent {} diff --git a/src/Events/TenancyBootstrapped.php b/src/Events/TenancyBootstrapped.php index a1a37448..e9071c5b 100644 --- a/src/Events/TenancyBootstrapped.php +++ b/src/Events/TenancyBootstrapped.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class TenancyBootstrapped extends Contracts\TenancyEvent -{ -} +class TenancyBootstrapped extends Contracts\TenancyEvent {} diff --git a/src/Events/TenancyEnded.php b/src/Events/TenancyEnded.php index b7f8d09c..6ab6a8c3 100644 --- a/src/Events/TenancyEnded.php +++ b/src/Events/TenancyEnded.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class TenancyEnded extends Contracts\TenancyEvent -{ -} +class TenancyEnded extends Contracts\TenancyEvent {} diff --git a/src/Events/TenancyInitialized.php b/src/Events/TenancyInitialized.php index 16261807..d1e5be60 100644 --- a/src/Events/TenancyInitialized.php +++ b/src/Events/TenancyInitialized.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class TenancyInitialized extends Contracts\TenancyEvent -{ -} +class TenancyInitialized extends Contracts\TenancyEvent {} diff --git a/src/Events/TenantCreated.php b/src/Events/TenantCreated.php index 6e8de41d..737e14d2 100644 --- a/src/Events/TenantCreated.php +++ b/src/Events/TenantCreated.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class TenantCreated extends Contracts\TenantEvent -{ -} +class TenantCreated extends Contracts\TenantEvent {} diff --git a/src/Events/TenantDeleted.php b/src/Events/TenantDeleted.php index 8bf62ad8..783fe1fe 100644 --- a/src/Events/TenantDeleted.php +++ b/src/Events/TenantDeleted.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class TenantDeleted extends Contracts\TenantEvent -{ -} +class TenantDeleted extends Contracts\TenantEvent {} diff --git a/src/Events/TenantSaved.php b/src/Events/TenantSaved.php index ec274cff..cd16d09c 100644 --- a/src/Events/TenantSaved.php +++ b/src/Events/TenantSaved.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class TenantSaved extends Contracts\TenantEvent -{ -} +class TenantSaved extends Contracts\TenantEvent {} diff --git a/src/Events/TenantUpdated.php b/src/Events/TenantUpdated.php index 13e6573f..7c02a266 100644 --- a/src/Events/TenantUpdated.php +++ b/src/Events/TenantUpdated.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class TenantUpdated extends Contracts\TenantEvent -{ -} +class TenantUpdated extends Contracts\TenantEvent {} diff --git a/src/Events/UpdatingDomain.php b/src/Events/UpdatingDomain.php index f4e7d0d9..42ee2550 100644 --- a/src/Events/UpdatingDomain.php +++ b/src/Events/UpdatingDomain.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class UpdatingDomain extends Contracts\DomainEvent -{ -} +class UpdatingDomain extends Contracts\DomainEvent {} diff --git a/src/Events/UpdatingTenant.php b/src/Events/UpdatingTenant.php index 6f74513f..ca548573 100644 --- a/src/Events/UpdatingTenant.php +++ b/src/Events/UpdatingTenant.php @@ -4,6 +4,4 @@ declare(strict_types=1); namespace Stancl\Tenancy\Events; -class UpdatingTenant extends Contracts\TenantEvent -{ -} +class UpdatingTenant extends Contracts\TenantEvent {} diff --git a/src/Features/TenantConfig.php b/src/Features/TenantConfig.php index 7b82a7cd..5bc84060 100644 --- a/src/Features/TenantConfig.php +++ b/src/Features/TenantConfig.php @@ -25,8 +25,7 @@ class TenantConfig implements Feature public function __construct( protected Repository $config, - ) { - } + ) {} public function bootstrap(Tenancy $tenancy): void { diff --git a/src/Jobs/CreateDatabase.php b/src/Jobs/CreateDatabase.php index 681d3d7a..94132b7e 100644 --- a/src/Jobs/CreateDatabase.php +++ b/src/Jobs/CreateDatabase.php @@ -25,8 +25,7 @@ class CreateDatabase implements ShouldQueue public function __construct( protected TenantWithDatabase&Model $tenant, - ) { - } + ) {} public function handle(DatabaseManager $databaseManager): bool { diff --git a/src/Jobs/CreateStorageSymlinks.php b/src/Jobs/CreateStorageSymlinks.php index a1116f86..4493de09 100644 --- a/src/Jobs/CreateStorageSymlinks.php +++ b/src/Jobs/CreateStorageSymlinks.php @@ -18,8 +18,7 @@ class CreateStorageSymlinks implements ShouldQueue public function __construct( public Tenant $tenant, - ) { - } + ) {} public function handle(): void { diff --git a/src/Jobs/DeleteDatabase.php b/src/Jobs/DeleteDatabase.php index 71358f74..b59a1c05 100644 --- a/src/Jobs/DeleteDatabase.php +++ b/src/Jobs/DeleteDatabase.php @@ -20,8 +20,7 @@ class DeleteDatabase implements ShouldQueue public function __construct( protected TenantWithDatabase&Model $tenant, - ) { - } + ) {} public function handle(): void { diff --git a/src/Jobs/MigrateDatabase.php b/src/Jobs/MigrateDatabase.php index 4624f212..424dacc9 100644 --- a/src/Jobs/MigrateDatabase.php +++ b/src/Jobs/MigrateDatabase.php @@ -19,8 +19,7 @@ class MigrateDatabase implements ShouldQueue public function __construct( protected TenantWithDatabase&Model $tenant, - ) { - } + ) {} public function handle(): void { diff --git a/src/Jobs/SeedDatabase.php b/src/Jobs/SeedDatabase.php index e1bae0c7..9958695e 100644 --- a/src/Jobs/SeedDatabase.php +++ b/src/Jobs/SeedDatabase.php @@ -19,8 +19,7 @@ class SeedDatabase implements ShouldQueue public function __construct( protected TenantWithDatabase&Model $tenant, - ) { - } + ) {} public function handle(): void { diff --git a/src/Listeners/CreateTenantConnection.php b/src/Listeners/CreateTenantConnection.php index 6af18a10..6bf6fd88 100644 --- a/src/Listeners/CreateTenantConnection.php +++ b/src/Listeners/CreateTenantConnection.php @@ -12,8 +12,7 @@ class CreateTenantConnection { public function __construct( protected DatabaseManager $database, - ) { - } + ) {} public function handle(TenancyEvent $event): void { diff --git a/src/Listeners/UseCentralConnection.php b/src/Listeners/UseCentralConnection.php index 716a5148..67b12a36 100644 --- a/src/Listeners/UseCentralConnection.php +++ b/src/Listeners/UseCentralConnection.php @@ -11,8 +11,7 @@ class UseCentralConnection { public function __construct( protected DatabaseManager $database, - ) { - } + ) {} public function handle(TenancyEvent $event): void { diff --git a/src/Listeners/UseTenantConnection.php b/src/Listeners/UseTenantConnection.php index a4c12108..c77d8683 100644 --- a/src/Listeners/UseTenantConnection.php +++ b/src/Listeners/UseTenantConnection.php @@ -11,8 +11,7 @@ class UseTenantConnection { public function __construct( protected DatabaseManager $database, - ) { - } + ) {} public function handle(TenancyEvent $event): void { diff --git a/src/Middleware/InitializeTenancyByDomain.php b/src/Middleware/InitializeTenancyByDomain.php index 35cbfa9a..4f6cd7aa 100644 --- a/src/Middleware/InitializeTenancyByDomain.php +++ b/src/Middleware/InitializeTenancyByDomain.php @@ -20,8 +20,7 @@ class InitializeTenancyByDomain extends IdentificationMiddleware implements Usab public function __construct( protected Tenancy $tenancy, protected DomainTenantResolver $resolver, - ) { - } + ) {} /** @return \Illuminate\Http\Response|mixed */ public function handle(Request $request, Closure $next): mixed diff --git a/src/Middleware/InitializeTenancyByPath.php b/src/Middleware/InitializeTenancyByPath.php index dd280965..c7772eff 100644 --- a/src/Middleware/InitializeTenancyByPath.php +++ b/src/Middleware/InitializeTenancyByPath.php @@ -25,8 +25,7 @@ class InitializeTenancyByPath extends IdentificationMiddleware implements Usable public function __construct( protected Tenancy $tenancy, protected PathTenantResolver $resolver, - ) { - } + ) {} /** @return \Illuminate\Http\Response|mixed */ public function handle(Request $request, Closure $next): mixed diff --git a/src/Middleware/InitializeTenancyByRequestData.php b/src/Middleware/InitializeTenancyByRequestData.php index b3de6115..e5623a75 100644 --- a/src/Middleware/InitializeTenancyByRequestData.php +++ b/src/Middleware/InitializeTenancyByRequestData.php @@ -25,8 +25,7 @@ class InitializeTenancyByRequestData extends IdentificationMiddleware implements public function __construct( protected Tenancy $tenancy, protected RequestDataTenantResolver $resolver, - ) { - } + ) {} /** @return \Illuminate\Http\Response|mixed */ public function handle(Request $request, Closure $next): mixed diff --git a/src/Resolvers/Contracts/CachedTenantResolver.php b/src/Resolvers/Contracts/CachedTenantResolver.php index 3ea518b3..cd982d2f 100644 --- a/src/Resolvers/Contracts/CachedTenantResolver.php +++ b/src/Resolvers/Contracts/CachedTenantResolver.php @@ -81,9 +81,7 @@ abstract class CachedTenantResolver implements TenantResolver * * Used for side effects like removing the tenant parameter from the request route. */ - public function resolved(Tenant $tenant, mixed ...$args): void - { - } + public function resolved(Tenant $tenant, mixed ...$args): void {} abstract public function getPossibleCacheKeys(Tenant&Model $tenant): array; diff --git a/src/ResourceSyncing/Events/CentralResourceAttachedToTenant.php b/src/ResourceSyncing/Events/CentralResourceAttachedToTenant.php index 017cdbbd..a390e928 100644 --- a/src/ResourceSyncing/Events/CentralResourceAttachedToTenant.php +++ b/src/ResourceSyncing/Events/CentralResourceAttachedToTenant.php @@ -13,6 +13,5 @@ class CentralResourceAttachedToTenant public function __construct( public SyncMaster&Model $centralResource, public TenantWithDatabase $tenant, - ) { - } + ) {} } diff --git a/src/ResourceSyncing/Events/CentralResourceDetachedFromTenant.php b/src/ResourceSyncing/Events/CentralResourceDetachedFromTenant.php index 9accf948..7fbf1d67 100644 --- a/src/ResourceSyncing/Events/CentralResourceDetachedFromTenant.php +++ b/src/ResourceSyncing/Events/CentralResourceDetachedFromTenant.php @@ -13,6 +13,5 @@ class CentralResourceDetachedFromTenant public function __construct( public SyncMaster&Model $centralResource, public TenantWithDatabase $tenant, - ) { - } + ) {} } diff --git a/src/ResourceSyncing/Events/SyncMasterDeleted.php b/src/ResourceSyncing/Events/SyncMasterDeleted.php index a712fba6..0c70494c 100644 --- a/src/ResourceSyncing/Events/SyncMasterDeleted.php +++ b/src/ResourceSyncing/Events/SyncMasterDeleted.php @@ -12,6 +12,5 @@ class SyncMasterDeleted public function __construct( public SyncMaster&Model $centralResource, public bool $forceDelete = false, - ) { - } + ) {} } diff --git a/src/ResourceSyncing/Events/SyncMasterRestored.php b/src/ResourceSyncing/Events/SyncMasterRestored.php index 5048f70b..a323b221 100644 --- a/src/ResourceSyncing/Events/SyncMasterRestored.php +++ b/src/ResourceSyncing/Events/SyncMasterRestored.php @@ -11,6 +11,5 @@ class SyncMasterRestored { public function __construct( public SyncMaster&Model $centralResource - ) { - } + ) {} } diff --git a/src/ResourceSyncing/Events/SyncedResourceSaved.php b/src/ResourceSyncing/Events/SyncedResourceSaved.php index 2d91cc37..a8bdc246 100644 --- a/src/ResourceSyncing/Events/SyncedResourceSaved.php +++ b/src/ResourceSyncing/Events/SyncedResourceSaved.php @@ -13,6 +13,5 @@ class SyncedResourceSaved public function __construct( public Syncable&Model $model, public TenantWithDatabase|null $tenant, - ) { - } + ) {} } diff --git a/src/ResourceSyncing/Events/SyncedResourceSavedInForeignDatabase.php b/src/ResourceSyncing/Events/SyncedResourceSavedInForeignDatabase.php index da24a367..89182878 100644 --- a/src/ResourceSyncing/Events/SyncedResourceSavedInForeignDatabase.php +++ b/src/ResourceSyncing/Events/SyncedResourceSavedInForeignDatabase.php @@ -14,6 +14,5 @@ class SyncedResourceSavedInForeignDatabase public function __construct( public Syncable&Model $model, public TenantWithDatabase|null $tenant - ) { - } + ) {} }