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

@@ 211-223 (lines=13) @@
208
     *
209
     * @SuppressWarnings("Superglobals")
210
     */
211
    public function currentURL()
212
    {
213
        if(!isset($_SERVER['REQUEST_URI']))
214
        {
215
            return '';
216
        }
217
        $requestURI = $_SERVER['REQUEST_URI'];
218
        if($requestURI[0] === '/')
219
        {
220
            $requestURI = substr($requestURI, 1);
221
        }
222
        return 'http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/'.$requestURI;
223
    }
224
}
225
226