Code Duplication    Length = 4-4 lines in 3 locations

Content.php 2 locations

@@ 26-29 (lines=4) @@
23
        self::$host = parse_url('http://'.$_SERVER['HTTP_HOST'])['host'];
24
        # Url
25
        self::$path = explode('/',parse_url(urldecode($_SERVER['REQUEST_URI']))['path']);
26
        foreach(self::$path as $key=>$value){
27
            $value = trim($value);
28
            if(empty($value)) unset(self::$path[$key]);
29
        }
30
        self::$path = array_values(self::$path);
31
        # Application
32
        self::$app = new Application;
@@ 49-52 (lines=4) @@
46
        self::$keywords = new Keywords;
47
        # Uri
48
        self::$uri = explode('/',$_SERVER['REQUEST_URI']);
49
        foreach(self::$uri as $key=>$value){
50
            if(empty($value)) unset(self::$uri[$key]);
51
            else self::$uri[$key] = urldecode($value);
52
        }
53
        self::$uri = array_values(self::$uri);
54
    }
55

Widget.php 1 location

@@ 19-22 (lines=4) @@
16
        self::$config = (new Config)->get();
17
        # Url
18
        self::$path = explode('/',parse_url(urldecode($_SERVER['REQUEST_URI']))['path']);
19
        foreach(self::$path as $key=>$value){
20
            $value = trim($value);
21
            if(empty($value)) unset(self::$path[$key]);
22
        }
23
        self::$path = array_values(self::$path);
24
        # Application
25
        self::$app = new Application;