1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 19:14:04 +00:00

phpstan improvements

This commit is contained in:
Samuel Štancl 2022-09-29 15:07:16 +02:00
parent 87212e5390
commit d463e2da61
10 changed files with 18 additions and 27 deletions

View file

@ -5,6 +5,7 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Middleware;
use Closure;
use Illuminate\Http\Request;
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
use Stancl\Tenancy\Contracts\TenantResolver;
use Stancl\Tenancy\Tenancy;
@ -17,7 +18,8 @@ abstract class IdentificationMiddleware
{
public static ?Closure $onFail = null;
public function initializeTenancy($request, $next, ...$resolverArguments)
/** @return \Illuminate\Http\Response|mixed */
public function initializeTenancy(Request $request, Closure $next, mixed ...$resolverArguments): mixed
{
try {
$this->tenancy->initialize(

View file

@ -10,7 +10,7 @@ use Stancl\Tenancy\Exceptions\TenancyNotInitializedException;
class ScopeSessions
{
public static $tenantIdKey = '_tenant_id';
public static string $tenantIdKey = '_tenant_id';
/** @return \Illuminate\Http\Response|mixed */
public function handle(Request $request, Closure $next): mixed