Code Duplication    Length = 13-13 lines in 2 locations

class.WebPage.php 1 location

@@ 313-325 (lines=13) @@
310
     *
311
     * @SuppressWarnings("Superglobals")
312
     */
313
    public function currentURL()
314
    {
315
        if(!isset($_SERVER['REQUEST_URI']))
316
        {
317
            return '';
318
        }
319
        $requestURI = $_SERVER['REQUEST_URI'];
320
        if($requestURI[0] === '/')
321
        {
322
            $requestURI = substr($requestURI, 1);
323
        }
324
        return 'http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/'.$requestURI;
325
    }
326
}
327
/* vim: set tabstop=4 shiftwidth=4 expandtab: */
328

Http/class.WebPage.php 1 location

@@ 185-197 (lines=13) @@
182
     *
183
     * @SuppressWarnings("Superglobals")
184
     */
185
    public function currentURL()
186
    {
187
        if(!isset($_SERVER['REQUEST_URI']))
188
        {
189
            return '';
190
        }
191
        $requestURI = $_SERVER['REQUEST_URI'];
192
        if($requestURI[0] === '/')
193
        {
194
            $requestURI = substr($requestURI, 1);
195
        }
196
        return 'http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/'.$requestURI;
197
    }
198
}
199
200