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

@@ 217-227 (lines=11) @@
214
215
        }
216
217
        if (!empty($parameters)) {
218
219
            if (in_array('query', array_keys($parameters), true)) {
220
                $query = $parameters['query'];
221
                $query = http_build_query($query);
222
                $path  = $path . '?' . $query;
223
            } else {
224
                $path = $path . '/' . implode('/', $parameters);
225
            }
226
227
        }
228
229
        if ($absolute) {
230