Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 152-165 (lines=14) @@
149
     *
150
     * @return string
151
     */
152
    private function buildPath()
153
    {
154
        $paths = [];
155
156
        foreach (func_get_args() as $arg)
157
        {
158
            if ($arg !== '')
159
            {
160
                $paths[] = $arg;
161
            }
162
        }
163
164
        return preg_replace('#(?<!:)/+#', '/', join('/', $paths));
165
    }
166
167
    /**
168
     * Convert a Windows path into a blasphemous Unix path.

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

@@ 123-136 (lines=14) @@
120
     *
121
     * @return string
122
     */
123
    private function buildPermalink()
124
    {
125
        $paths = [];
126
127
        foreach (func_get_args() as $arg)
128
        {
129
            if ($arg !== '')
130
            {
131
                $paths[] = $arg;
132
            }
133
        }
134
135
        return preg_replace('#(?<!:)/+#', '/', join('/', $paths));
136
    }
137
}
138