Code Duplication    Length = 16-17 lines in 2 locations

src/FileHelper.php 1 location

@@ 30-46 (lines=17) @@
27
        return File::glob($path);
28
    }
29
30
    public static function adjustPath($path)
31
    {
32
33
        if ($path == '') {
34
            return array();
35
        }
36
37
        $p = explode(",", str_replace('\\', '/', $path));
38
39
        $pathList = array_map(function ($item) {
40
            return str_finish($item, '/');
41
        },
42
            $p
43
        );
44
45
        return $pathList;
46
    }
47
}
48

src/WhiteList.php 1 location

@@ 18-33 (lines=16) @@
15
     * @param $white
16
     * @return array
17
     */
18
    public static function adjustWhiteList($white)
19
    {
20
        if ($white == '') {
21
            return array();
22
        }
23
24
        $w = explode(",", str_replace('\\', '/', $white));
25
26
        $whitelist = array_map(function ($item) {
27
            return str_finish($item, '/');
28
        },
29
            $w
30
        );
31
32
        return $whitelist;
33
    }
34
}
35