upgrade to laravel 7 and set branch to v2

This commit is contained in:
2020-12-25 11:22:15 +00:00
parent 516105c492
commit 0ddd298350
4638 changed files with 132501 additions and 190226 deletions

View File

@@ -84,10 +84,8 @@ class RequestMatcher implements RequestMatcherInterface
/**
* Adds a check for the URL host name.
*
* @param string|null $regexp A Regexp
*/
public function matchHost($regexp)
public function matchHost(?string $regexp)
{
$this->host = $regexp;
}
@@ -104,10 +102,8 @@ class RequestMatcher implements RequestMatcherInterface
/**
* Adds a check for the URL path info.
*
* @param string|null $regexp A Regexp
*/
public function matchPath($regexp)
public function matchPath(?string $regexp)
{
$this->path = $regexp;
}
@@ -117,7 +113,7 @@ class RequestMatcher implements RequestMatcherInterface
*
* @param string $ip A specific IP address or a range specified using IP/netmask like 192.168.1.0/24
*/
public function matchIp($ip)
public function matchIp(string $ip)
{
$this->matchIps($ip);
}
@@ -129,7 +125,11 @@ class RequestMatcher implements RequestMatcherInterface
*/
public function matchIps($ips)
{
$this->ips = null !== $ips ? (array) $ips : [];
$ips = null !== $ips ? (array) $ips : [];
$this->ips = array_reduce($ips, static function (array $ips, string $ip) {
return array_merge($ips, preg_split('/\s*,\s*/', $ip));
}, []);
}
/**
@@ -144,11 +144,8 @@ class RequestMatcher implements RequestMatcherInterface
/**
* Adds a check for request attribute.
*
* @param string $key The request attribute name
* @param string $regexp A Regexp
*/
public function matchAttribute($key, $regexp)
public function matchAttribute(string $key, string $regexp)
{
$this->attributes[$key] = $regexp;
}