Code Duplication    Length = 8-8 lines in 2 locations

Css.php 1 location

@@ 10-17 (lines=8) @@
7
    private static $host;
8
    private static $config;   
9
10
    public function __construct(){
11
        # Config
12
        self::$config = (new Config)->get();
13
        # Host
14
        self::$host = parse_url('http://'.$_SERVER['HTTP_HOST']);
15
        if(isset(self::$host['host'])) self::$host = self::$host['host'];
16
        else self::$host = '/';
17
    }
18
19
    public function add($css){
20
        if(!is_array($css)) $css = [$css];

Js.php 1 location

@@ 10-17 (lines=8) @@
7
    private static $host;
8
    private static $config;   
9
10
    public function __construct(){
11
        # Config
12
        self::$config = (new Config)->get();
13
        # Host
14
        self::$host = parse_url('http://'.$_SERVER['HTTP_HOST']);
15
        if(isset(self::$host['host'])) self::$host = self::$host['host'];
16
        else self::$host = '/';
17
    }
18
19
    public function add($js){
20
        if(!is_array($js)) $js = [$js];