Code Duplication    Length = 11-11 lines in 2 locations

src/View/Helper/Route.php 1 location

@@ 58-68 (lines=11) @@
55
            throw new RouteInvalidException('No route for name "' . $name . '" found');
56
        }
57
58
        if (!empty($parameters)) {
59
60
            if (in_array('query', array_keys($parameters), true)) {
61
                $query = $parameters['query'];
62
                $query = http_build_query($query);
63
                $path  = $path . '?' . $query;
64
            } else {
65
                $path = $path . '/' . implode('/', $parameters);
66
            }
67
68
        }
69
70
        if ($absolute) {
71

src/Controller/AbstractController.php 1 location

@@ 224-234 (lines=11) @@
221
222
        }
223
224
        if (!empty($parameters)) {
225
226
            if (in_array('query', array_keys($parameters), true)) {
227
                $query = $parameters['query'];
228
                $query = http_build_query($query);
229
                $path  = $path . '?' . $query;
230
            } else {
231
                $path = $path . '/' . implode('/', $parameters);
232
            }
233
234
        }
235
236
        if ($absolute) {
237