Skip to content

Commit c564174

Browse files
authored
Merge pull request #7006 from kenjis/rector-RequestTrait
refactor: RequestTrait by rector
2 parents f04c67d + a47e45e commit c564174

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

system/HTTP/RequestTrait.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,11 @@ public function getIPAddress(): string
6464
*/
6565
// @phpstan-ignore-next-line
6666
$proxyIPs = $this->proxyIPs ?? config('App')->proxyIPs;
67-
if (! empty($proxyIPs)) {
68-
// @phpstan-ignore-next-line
69-
if (! is_array($proxyIPs) || is_int(array_key_first($proxyIPs))) {
70-
throw new ConfigException(
71-
'You must set an array with Proxy IP address key and HTTP header name value in Config\App::$proxyIPs.'
72-
);
73-
}
67+
// @phpstan-ignore-next-line
68+
if (! empty($proxyIPs) && (! is_array($proxyIPs) || is_int(array_key_first($proxyIPs)))) {
69+
throw new ConfigException(
70+
'You must set an array with Proxy IP address key and HTTP header name value in Config\App::$proxyIPs.'
71+
);
7472
}
7573

7674
$this->ipAddress = $this->getServer('REMOTE_ADDR');

0 commit comments

Comments
 (0)