Code Duplication    Length = 8-11 lines in 2 locations

src/Utils/URI.php 2 locations

@@ 51-58 (lines=8) @@
48
        {
49
            if(!empty($_SERVER['HTTP_X_FORWARDED_HOST']))
50
            {
51
                if(strpos($_SERVER['HTTP_X_FORWARDED_HOST'], ':') > 0)
52
                {
53
                    list($aURL['host'], $aURL['port']) = explode(':', $_SERVER['HTTP_X_FORWARDED_HOST']);
54
                }
55
                else
56
                {
57
                    $aURL['host'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
58
                }
59
            }
60
            elseif(!empty($_SERVER['HTTP_HOST']))
61
            {
@@ 60-70 (lines=11) @@
57
                    $aURL['host'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
58
                }
59
            }
60
            elseif(!empty($_SERVER['HTTP_HOST']))
61
            {
62
                if(strpos($_SERVER['HTTP_HOST'], ':') > 0)
63
                {
64
                    list($aURL['host'], $aURL['port']) = explode(':', $_SERVER['HTTP_HOST']);
65
                }
66
                else
67
                {
68
                    $aURL['host'] = $_SERVER['HTTP_HOST'];
69
                }
70
            }
71
            elseif(!empty($_SERVER['SERVER_NAME']))
72
            {
73
                $aURL['host'] = $_SERVER['SERVER_NAME'];