| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function resolve(Route $route, array $parameters): string |
||
| 21 | { |
||
| 22 | try { |
||
| 23 | return $this->to( |
||
| 24 | $route, |
||
| 25 | $this->url->formatParameters($parameters), |
||
| 26 | true |
||
| 27 | ); |
||
| 28 | } catch (UrlGenerationException $exception) { |
||
| 29 | // Create an uri with missing parameters between brackets |
||
| 30 | $domain = $this->getRouteDomain($route, $parameters); |
||
| 31 | |||
| 32 | return $this->addQueryString($this->url->format( |
||
| 33 | $root = $this->replaceRootParameters($route, $domain, $parameters), |
||
| 34 | $this->replaceRouteParameters($route->uri(), $parameters), |
||
| 35 | $route |
||
| 36 | ), $parameters); |
||
| 37 | } |
||
| 38 | } |
||
| 39 | } |
||
| 40 |