remove unnecessary foreach in RouteCollection::checkSubdomains()

This commit is contained in:
Abdul Malik Ikhsan 2020-07-04 08:39:05 +07:00
parent d027176440
commit 804f8497fa
No known key found for this signature in database
GPG Key ID: 23FCCC74D1442CAE

View File

@ -1517,15 +1517,7 @@ class RouteCollection implements RouteCollectionInterface
return true;
}
foreach ($subdomains as $subdomain)
{
if ($subdomain === $this->currentSubdomain)
{
return true;
}
}
return false;
return in_array($this->currentSubdomain, $subdomains, true);
}
//--------------------------------------------------------------------