Skip to content

Commit 8107917

Browse files
committed
inline variable
no need to create the temporary `$ipAddress` variable, we can access the array offset directly from the function.
1 parent b71e324 commit 8107917

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Request.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,7 @@ public function getClientIps(): array
750750
*/
751751
public function getClientIp(): ?string
752752
{
753-
$ipAddresses = $this->getClientIps();
754-
755-
return $ipAddresses[0];
753+
return $this->getClientIps()[0];
756754
}
757755

758756
/**

0 commit comments

Comments
 (0)