Code Duplication    Length = 7-9 lines in 2 locations

framework/Koch/Http/HttpRequest.php 2 locations

@@ 575-581 (lines=7) @@
572
     *
573
     * @return string String denoting the user agent being which is accessing the page.
574
     */
575
    public static function getUserAgent()
576
    {
577
        $ua          = strip_tags($_SERVER['HTTP_USER_AGENT']);
578
        $ua_filtered = filter_var($ua, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH);
579
580
        return $ua_filtered;
581
    }
582
583
    /**
584
     * Returns the Referrer ($_SERVER HTTP_REFERER).
@@ 588-596 (lines=9) @@
585
     *
586
     * @return string The address of the page (if any) which referred the user agent to the current page.
587
     */
588
    public static function getReferer()
589
    {
590
        if ($_SERVER['HTTP_REFERER'] !== null) {
591
            $refr          = strip_tags($_SERVER['HTTP_REFERER']);
592
            $refr_filtered = filter_var($refr, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH);
593
        }
594
595
        return $refr_filtered;
596
    }
597
598
    /**
599
     * Validates a given IP.