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/Templating/Twig/Extension/BaseUrlFunction.php 1 location

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