From cf1c59aee0098406709ebe369ae8905a809bec99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sessing=C3=B8?= Date: Thu, 25 Mar 2021 14:24:50 +0100 Subject: [PATCH] Changed parameter name and added parameter phpDocs description. --- src/Pecee/Http/Request.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Pecee/Http/Request.php b/src/Pecee/Http/Request.php index bb3f8d6..e1d363a 100644 --- a/src/Pecee/Http/Request.php +++ b/src/Pecee/Http/Request.php @@ -215,13 +215,13 @@ class Request * Get id address * If $safe is false, this function will detect Proxys. But the user can edit this header to whatever he wants! * https://stackoverflow.com/questions/3003145/how-to-get-the-client-ip-address-in-php#comment-25086804 - * @param bool $safe + * @param bool $safeMode When enabled, only safe non-spoofable headers will be returned. Note this can cause issues when using proxy. * @return string|null */ - public function getIp(bool $safe = false): ?string + public function getIp(bool $safeMode = false): ?string { $headers = ['remote-addr']; - if($safe === false) { + if($safeMode === false) { $headers = array_merge($headers, [ 'http-cf-connecting-ip', 'http-client-ip',