Code Duplication    Length = 5-5 lines in 2 locations

src/helpers.php 2 locations

@@ 873-877 (lines=5) @@
870
            $server_name = $_SERVER['SERVER_NAME'];
871
        }
872
873
        if (isNullOrEmpty($server_name) && isNotNullOrEmpty($logPath)) {
874
            $msg = 'No server name given for calling curl ' . $url . ' behind proxy or LB';
875
            logToFile($logPath, $msg);
876
            return false;
877
        }
878
879
        if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmptyArrayKey($_SERVER, 'SERVER_ADDR')) {
880
            $localServerIpAddress = $_SERVER['SERVER_ADDR'];
@@ 883-887 (lines=5) @@
880
            $localServerIpAddress = $_SERVER['SERVER_ADDR'];
881
        }
882
883
        if (isNullOrEmpty($localServerIpAddress) && isNotNullOrEmpty($logPath)) {
884
            $msg = 'No localIPAddress given for calling curl ' . $url . ' behind proxy or LB';
885
            logToFile($logPath, $msg);
886
            return false;
887
        }
888
889
        $url = str_replace($server_name, $localServerIpAddress, $url);
890