mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 19:24:03 +00:00
get down to 59 phpstan errors
This commit is contained in:
parent
193e044777
commit
a94227a19c
26 changed files with 130 additions and 130 deletions
|
|
@ -16,19 +16,16 @@ use Stancl\Tenancy\Tenancy;
|
|||
|
||||
class TenantConfig implements Feature
|
||||
{
|
||||
/** @var Repository */
|
||||
protected $config;
|
||||
|
||||
public array $originalConfig = [];
|
||||
|
||||
public static $storageToConfigMap = [
|
||||
/** @var array<string, string> */
|
||||
public static array $storageToConfigMap = [
|
||||
// 'paypal_api_key' => 'services.paypal.api_key',
|
||||
];
|
||||
|
||||
public function __construct(Repository $config)
|
||||
{
|
||||
$this->config = $config;
|
||||
}
|
||||
public function __construct(
|
||||
protected Repository $config,
|
||||
) {}
|
||||
|
||||
public function bootstrap(Tenancy $tenancy): void
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class UniversalRoutes implements Feature
|
|||
public static string $middlewareGroup = 'universal';
|
||||
|
||||
// todo docblock
|
||||
/** @var array<class-string<\Stancl\Tenancy\Middleware\IdentificationMiddleware>> */
|
||||
public static array $identificationMiddlewares = [
|
||||
Middleware\InitializeTenancyByDomain::class,
|
||||
Middleware\InitializeTenancyBySubdomain::class,
|
||||
|
|
@ -42,7 +43,10 @@ class UniversalRoutes implements Feature
|
|||
|
||||
public static function routeHasMiddleware(Route $route, string $middleware): bool
|
||||
{
|
||||
if (in_array($middleware, $route->middleware(), true)) {
|
||||
/** @var array $routeMiddleware */
|
||||
$routeMiddleware = $route->middleware();
|
||||
|
||||
if (in_array($middleware, $routeMiddleware, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue