1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-06 09:34:04 +00:00

resolve phpstan issue from CI

This commit is contained in:
Samuel Štancl 2022-11-08 13:46:04 +01:00
parent 72c5d57a4d
commit 52336ddc8f
2 changed files with 6 additions and 2 deletions

View file

@ -15,7 +15,10 @@ class PathTenantResolver extends Contracts\CachedTenantResolver
/** @var Route $route */
$route = $args[0];
if ($id = (string) $route->parameter(static::tenantParameterName())) {
/** @var string $id */
$id = $route->parameter(static::tenantParameterName());
if ($id) {
$route->forgetParameter(static::tenantParameterName());
if ($tenant = tenancy()->find($id)) {