Code Duplication    Length = 5-5 lines in 2 locations

src/helpers.php 2 locations

@@ 865-869 (lines=5) @@
862
            $server_name = $_SERVER['SERVER_NAME'];
863
        }
864
865
        if (isNullOrEmpty($server_name) && isNotNullOrEmpty($logPath)) {
866
            $msg = 'No server name given for calling curl ' . $url . ' behind proxy or LB';
867
            logToFile($logPath, $msg);
868
            return false;
869
        }
870
871
        if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmptyArrayKey($_SERVER, 'SERVER_ADDR')) {
872
            $localServerIpAddress = $_SERVER['SERVER_ADDR'];
@@ 875-879 (lines=5) @@
872
            $localServerIpAddress = $_SERVER['SERVER_ADDR'];
873
        }
874
875
        if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmpty($logPath)) {
876
            $msg = 'No localIPAddress given for calling curl ' . $url . ' behind proxy or LB';
877
            logToFile($logPath, $msg);
878
            return false;
879
        }
880
881
        $url = str_replace($server_name, $localServerIpAddress, $url);
882