From 9edf139be0d42700a837b6d5b37466d5ac7ddd5f Mon Sep 17 00:00:00 2001 From: erikgaal Date: Thu, 23 Jun 2022 12:51:20 +0000 Subject: [PATCH] Fix styling --- src/CacheManager.php | 1 - src/Commands/Install.php | 2 -- src/Commands/Migrate.php | 2 -- src/Commands/MigrateFresh.php | 2 -- src/Commands/Rollback.php | 2 -- src/Commands/Run.php | 2 -- src/Commands/Seed.php | 2 -- src/Commands/TenantList.php | 2 -- src/Concerns/HasATenantsOption.php | 2 +- src/Contracts/TenantDatabaseManager.php | 10 ---------- src/Database/Concerns/TenantRun.php | 3 --- src/DatabaseConfig.php | 5 ++--- src/Features/UserImpersonation.php | 1 - src/Middleware/InitializeTenancyByDomain.php | 6 +++--- .../InitializeTenancyByDomainOrSubdomain.php | 2 -- src/Middleware/InitializeTenancyByPath.php | 4 +++- src/Middleware/InitializeTenancyByRequestData.php | 2 -- src/Middleware/InitializeTenancyBySubdomain.php | 2 -- src/Resolvers/Contracts/CachedTenantResolver.php | 1 - src/Tenancy.php | 5 ----- src/TenancyServiceProvider.php | 4 ---- 21 files changed, 9 insertions(+), 53 deletions(-) diff --git a/src/CacheManager.php b/src/CacheManager.php index 777a142f..09581201 100644 --- a/src/CacheManager.php +++ b/src/CacheManager.php @@ -13,7 +13,6 @@ class CacheManager extends BaseCacheManager * * @param string $method * @param array $parameters - * @return mixed */ public function __call($method, $parameters) { diff --git a/src/Commands/Install.php b/src/Commands/Install.php index dd2dd280..41492b26 100644 --- a/src/Commands/Install.php +++ b/src/Commands/Install.php @@ -24,8 +24,6 @@ class Install extends Command /** * Execute the console command. - * - * @return mixed */ public function handle() { diff --git a/src/Commands/Migrate.php b/src/Commands/Migrate.php index c67d3598..52ecd47f 100644 --- a/src/Commands/Migrate.php +++ b/src/Commands/Migrate.php @@ -33,8 +33,6 @@ class Migrate extends MigrateCommand /** * Execute the console command. - * - * @return mixed */ public function handle() { diff --git a/src/Commands/MigrateFresh.php b/src/Commands/MigrateFresh.php index 283d70b0..63860153 100644 --- a/src/Commands/MigrateFresh.php +++ b/src/Commands/MigrateFresh.php @@ -31,8 +31,6 @@ final class MigrateFresh extends Command /** * Execute the console command. - * - * @return mixed */ public function handle() { diff --git a/src/Commands/Rollback.php b/src/Commands/Rollback.php index e60d974b..1c434189 100644 --- a/src/Commands/Rollback.php +++ b/src/Commands/Rollback.php @@ -42,8 +42,6 @@ class Rollback extends RollbackCommand /** * Execute the console command. - * - * @return mixed */ public function handle() { diff --git a/src/Commands/Run.php b/src/Commands/Run.php index aa518d7a..2b20d9c3 100644 --- a/src/Commands/Run.php +++ b/src/Commands/Run.php @@ -27,8 +27,6 @@ class Run extends Command /** * Execute the console command. - * - * @return mixed */ public function handle() { diff --git a/src/Commands/Seed.php b/src/Commands/Seed.php index dc97ae71..8c525208 100644 --- a/src/Commands/Seed.php +++ b/src/Commands/Seed.php @@ -35,8 +35,6 @@ class Seed extends SeedCommand /** * Execute the console command. - * - * @return mixed */ public function handle() { diff --git a/src/Commands/TenantList.php b/src/Commands/TenantList.php index d01afcb9..13775676 100644 --- a/src/Commands/TenantList.php +++ b/src/Commands/TenantList.php @@ -25,8 +25,6 @@ class TenantList extends Command /** * Execute the console command. - * - * @return mixed */ public function handle() { diff --git a/src/Concerns/HasATenantsOption.php b/src/Concerns/HasATenantsOption.php index a2b94ac5..32d508ec 100644 --- a/src/Concerns/HasATenantsOption.php +++ b/src/Concerns/HasATenantsOption.php @@ -12,7 +12,7 @@ trait HasATenantsOption protected function getOptions() { return array_merge([ - ['tenants', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, '', null], + ['tenants', null, InputOption::VALUE_IS_ARRAY|InputOption::VALUE_OPTIONAL, '', null], ], parent::getOptions()); } diff --git a/src/Contracts/TenantDatabaseManager.php b/src/Contracts/TenantDatabaseManager.php index aeed3dce..92801d75 100644 --- a/src/Contracts/TenantDatabaseManager.php +++ b/src/Contracts/TenantDatabaseManager.php @@ -20,18 +20,11 @@ interface TenantDatabaseManager /** * Does a database exist. - * - * @param string $name - * @return bool */ public function databaseExists(string $name): bool; /** * Make a DB connection config array. - * - * @param array $baseConfig - * @param string $databaseName - * @return array */ public function makeConnectionConfig(array $baseConfig, string $databaseName): array; @@ -39,9 +32,6 @@ interface TenantDatabaseManager * Set the DB connection that should be used by the tenant database manager. * * @throws NoConnectionSetException - * - * @param string $connection - * @return void */ public function setConnection(string $connection): void; } diff --git a/src/Database/Concerns/TenantRun.php b/src/Database/Concerns/TenantRun.php index d9a444de..29bbedac 100644 --- a/src/Database/Concerns/TenantRun.php +++ b/src/Database/Concerns/TenantRun.php @@ -11,9 +11,6 @@ trait TenantRun /** * Run a callback in this tenant's context. * Atomic, safely reverts to previous context. - * - * @param callable $callback - * @return mixed */ public function run(callable $callback) { diff --git a/src/DatabaseConfig.php b/src/DatabaseConfig.php index c8280632..b3195960 100644 --- a/src/DatabaseConfig.php +++ b/src/DatabaseConfig.php @@ -80,8 +80,6 @@ class DatabaseConfig /** * Generate DB name, username & password and write them to the tenant model. - * - * @return void */ public function makeCredentials(): void { @@ -113,7 +111,8 @@ class DatabaseConfig $templateConnection = config("database.connections.{$template}"); return $this->manager()->makeConnectionConfig( - array_merge($templateConnection, $this->tenantConfig()), $this->getName() + array_merge($templateConnection, $this->tenantConfig()), + $this->getName() ); } diff --git a/src/Features/UserImpersonation.php b/src/Features/UserImpersonation.php index 48d65bb9..f96465ff 100644 --- a/src/Features/UserImpersonation.php +++ b/src/Features/UserImpersonation.php @@ -33,7 +33,6 @@ class UserImpersonation implements Feature * * @param string|ImpersonationToken $token * @param int $ttl - * @return RedirectResponse */ public static function makeResponse($token, int $ttl = null): RedirectResponse { diff --git a/src/Middleware/InitializeTenancyByDomain.php b/src/Middleware/InitializeTenancyByDomain.php index 24a1abb7..5a07112d 100644 --- a/src/Middleware/InitializeTenancyByDomain.php +++ b/src/Middleware/InitializeTenancyByDomain.php @@ -29,13 +29,13 @@ class InitializeTenancyByDomain extends IdentificationMiddleware * Handle an incoming request. * * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @return mixed */ public function handle($request, Closure $next) { return $this->initializeTenancy( - $request, $next, $request->getHost() + $request, + $next, + $request->getHost() ); } } diff --git a/src/Middleware/InitializeTenancyByDomainOrSubdomain.php b/src/Middleware/InitializeTenancyByDomainOrSubdomain.php index 94217bba..9b153db3 100644 --- a/src/Middleware/InitializeTenancyByDomainOrSubdomain.php +++ b/src/Middleware/InitializeTenancyByDomainOrSubdomain.php @@ -13,8 +13,6 @@ class InitializeTenancyByDomainOrSubdomain * Handle an incoming request. * * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @return mixed */ public function handle($request, Closure $next) { diff --git a/src/Middleware/InitializeTenancyByPath.php b/src/Middleware/InitializeTenancyByPath.php index 6289199b..e66400c5 100644 --- a/src/Middleware/InitializeTenancyByPath.php +++ b/src/Middleware/InitializeTenancyByPath.php @@ -38,7 +38,9 @@ class InitializeTenancyByPath extends IdentificationMiddleware // simply injected into some route controller action. if ($route->parameterNames()[0] === PathTenantResolver::$tenantParameterName) { return $this->initializeTenancy( - $request, $next, $route + $request, + $next, + $route ); } else { throw new RouteIsMissingTenantParameterException; diff --git a/src/Middleware/InitializeTenancyByRequestData.php b/src/Middleware/InitializeTenancyByRequestData.php index de75d8c5..4e1d33ff 100644 --- a/src/Middleware/InitializeTenancyByRequestData.php +++ b/src/Middleware/InitializeTenancyByRequestData.php @@ -36,8 +36,6 @@ class InitializeTenancyByRequestData extends IdentificationMiddleware * Handle an incoming request. * * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @return mixed */ public function handle($request, Closure $next) { diff --git a/src/Middleware/InitializeTenancyBySubdomain.php b/src/Middleware/InitializeTenancyBySubdomain.php index 55d76b05..76389df7 100644 --- a/src/Middleware/InitializeTenancyBySubdomain.php +++ b/src/Middleware/InitializeTenancyBySubdomain.php @@ -28,8 +28,6 @@ class InitializeTenancyBySubdomain extends InitializeTenancyByDomain * Handle an incoming request. * * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @return mixed */ public function handle($request, Closure $next) { diff --git a/src/Resolvers/Contracts/CachedTenantResolver.php b/src/Resolvers/Contracts/CachedTenantResolver.php index 968ac794..e84f1fb1 100644 --- a/src/Resolvers/Contracts/CachedTenantResolver.php +++ b/src/Resolvers/Contracts/CachedTenantResolver.php @@ -75,7 +75,6 @@ abstract class CachedTenantResolver implements TenantResolver /** * Get all the arg combinations for resolve() that can be used to find this tenant. * - * @param Tenant $tenant * @return array[] */ abstract public function getArgsForTenant(Tenant $tenant): array; diff --git a/src/Tenancy.php b/src/Tenancy.php index 30f138e3..6873f93b 100644 --- a/src/Tenancy.php +++ b/src/Tenancy.php @@ -27,7 +27,6 @@ class Tenancy /** * Initializes the tenant. * @param Tenant|int|string $tenant - * @return void */ public function initialize($tenant): void { @@ -106,9 +105,6 @@ class Tenancy /** * Run a callback in the central context. * Atomic, safely reverts to previous context. - * - * @param callable $callback - * @return mixed */ public function central(callable $callback) { @@ -132,7 +128,6 @@ class Tenancy * More performant than running $tenant->run() one by one. * * @param Tenant[]|\Traversable|string[]|null $tenants - * @param callable $callback * @return void */ public function runForMultiple($tenants, callable $callback) diff --git a/src/TenancyServiceProvider.php b/src/TenancyServiceProvider.php index dd061af3..e23200a6 100644 --- a/src/TenancyServiceProvider.php +++ b/src/TenancyServiceProvider.php @@ -15,8 +15,6 @@ class TenancyServiceProvider extends ServiceProvider { /** * Register services. - * - * @return void */ public function register(): void { @@ -76,8 +74,6 @@ class TenancyServiceProvider extends ServiceProvider /** * Bootstrap services. - * - * @return void */ public function boot(): void {