Code Duplication    Length = 5-5 lines in 2 locations

src/helpers.php 2 locations

@@ 857-861 (lines=5) @@
854
            $server_name = $_SERVER['SERVER_NAME'];
855
        }
856
857
        if (isNullOrEmpty($server_name) && isNotNullOrEmpty($logPath)) {
858
            $msg = 'No server name given for calling curl ' . $url . ' behind proxy or LB';
859
            logToFile($logPath, $msg);
860
            return false;
861
        }
862
863
        if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmptyArrayKey($_SERVER, 'SERVER_ADDR')) {
864
            $localServerIpAddress = $_SERVER['SERVER_ADDR'];
@@ 867-871 (lines=5) @@
864
            $localServerIpAddress = $_SERVER['SERVER_ADDR'];
865
        }
866
867
        if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmpty($logPath)) {
868
            $msg = 'No localIPAddress given for calling curl ' . $url . ' behind proxy or LB';
869
            logToFile($logPath, $msg);
870
            return false;
871
        }
872
873
        $url = str_replace($server_name, $localServerIpAddress, $url);
874