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

@@ 235-247 (lines=13) @@
232
     *
233
     * @SuppressWarnings("Superglobals")
234
     */
235
    public function currentURL()
236
    {
237
        if(!isset($_SERVER['REQUEST_URI']))
238
        {
239
            return '';
240
        }
241
        $requestURI = $_SERVER['REQUEST_URI'];
242
        if($requestURI[0] === '/')
243
        {
244
            $requestURI = substr($requestURI, 1);
245
        }
246
        return 'http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/'.$requestURI;
247
    }
248
}
249
250