Code Duplication    Length = 14-14 lines in 2 locations

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

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

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

@@ 92-105 (lines=14) @@
89
     *
90
     * @return string
91
     */
92
    private function buildPermalink()
93
    {
94
        $paths = [];
95
96
        foreach (func_get_args() as $arg)
97
        {
98
            if ($arg !== '')
99
            {
100
                $paths[] = $arg;
101
            }
102
        }
103
104
        return preg_replace('#(?<!:)/+#', '/', join('/', $paths));
105
    }
106
}
107