Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 138-151 (lines=14) @@
135
     *
136
     * @return string
137
     */
138
    private function buildPath()
139
    {
140
        $paths = [];
141
142
        foreach (func_get_args() as $arg)
143
        {
144
            if ($arg !== '')
145
            {
146
                $paths[] = $arg;
147
            }
148
        }
149
150
        return preg_replace('#(?<!:)/+#', '/', join('/', $paths));
151
    }
152
153
    /**
154
     * 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