mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:24:03 +00:00
get phpstan errors down from 252 to 189
This commit is contained in:
parent
fb8b9c1614
commit
8af354c20e
40 changed files with 119 additions and 115 deletions
|
|
@ -25,7 +25,7 @@ abstract class CachedTenantResolver implements TenantResolver
|
|||
$this->cache = $cache->store(static::$cacheStore);
|
||||
}
|
||||
|
||||
public function resolve(...$args): Tenant
|
||||
public function resolve(mixed ...$args): Tenant
|
||||
{
|
||||
if (! static::$shouldCache) {
|
||||
return $this->resolveWithoutCache(...$args);
|
||||
|
|
@ -58,12 +58,12 @@ abstract class CachedTenantResolver implements TenantResolver
|
|||
}
|
||||
}
|
||||
|
||||
public function getCacheKey(...$args): string
|
||||
public function getCacheKey(mixed ...$args): string
|
||||
{
|
||||
return '_tenancy_resolver:' . static::class . ':' . json_encode($args);
|
||||
}
|
||||
|
||||
abstract public function resolveWithoutCache(...$args): Tenant;
|
||||
abstract public function resolveWithoutCache(mixed ...$args): Tenant;
|
||||
|
||||
public function resolved(Tenant $tenant, ...$args): void
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class DomainTenantResolver extends Contracts\CachedTenantResolver
|
|||
|
||||
public static string|null $cacheStore = null; // default
|
||||
|
||||
public function resolveWithoutCache(...$args): Tenant
|
||||
public function resolveWithoutCache(mixed ...$args): Tenant
|
||||
{
|
||||
$domain = $args[0];
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class PathTenantResolver extends Contracts\CachedTenantResolver
|
|||
|
||||
public static string|null $cacheStore = null; // default
|
||||
|
||||
public function resolveWithoutCache(...$args): Tenant
|
||||
public function resolveWithoutCache(mixed ...$args): Tenant
|
||||
{
|
||||
/** @var Route $route */
|
||||
$route = $args[0];
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class RequestDataTenantResolver extends Contracts\CachedTenantResolver
|
|||
|
||||
public static string|null $cacheStore = null; // default
|
||||
|
||||
public function resolveWithoutCache(...$args): Tenant
|
||||
public function resolveWithoutCache(mixed ...$args): Tenant
|
||||
{
|
||||
$payload = $args[0];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue