mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:24:03 +00:00
phpstan fix
This commit is contained in:
parent
91295f01e2
commit
62624275cc
1 changed files with 4 additions and 1 deletions
|
|
@ -11,7 +11,10 @@ class InitializeTenancyByOriginHeader extends InitializeTenancyByDomainOrSubdoma
|
||||||
public function getDomain(Request $request): string
|
public function getDomain(Request $request): string
|
||||||
{
|
{
|
||||||
if ($origin = $request->header('Origin', '')) {
|
if ($origin = $request->header('Origin', '')) {
|
||||||
return parse_url($origin, PHP_URL_HOST) ?? $origin;
|
$host = parse_url($origin, PHP_URL_HOST) ?? $origin;
|
||||||
|
assert(is_string($host) && strlen($host) > 0);
|
||||||
|
|
||||||
|
return $host;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return '';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue