Code Duplication    Length = 14-14 lines in 2 locations

src/allejo/stakx/Filesystem/FilesystemPath.php 1 location

@@ 141-154 (lines=14) @@
138
     *
139
     * @return string
140
     */
141
    private function buildPath()
142
    {
143
        $paths = [];
144
145
        foreach (func_get_args() as $arg)
146
        {
147
            if ($arg !== '')
148
            {
149
                $paths[] = $arg;
150
            }
151
        }
152
153
        return preg_replace('#(?<!:)/+#', '/', join('/', $paths));
154
    }
155
156
    /**
157
     * Convert a Windows path into a blasphemous Unix path.

src/allejo/stakx/Twig/BaseUrlFunction.php 1 location

@@ 86-99 (lines=14) @@
83
     * @link   https://stackoverflow.com/a/15575293
84
     * @return string
85
     */
86
    private function buildPermalink()
87
    {
88
        $paths = array();
89
90
        foreach (func_get_args() as $arg)
91
        {
92
            if ($arg !== '')
93
            {
94
                $paths[] = $arg;
95
            }
96
        }
97
98
        return preg_replace('#(?<!:)/+#','/', join('/', $paths));
99
    }
100
}
101