| Total Complexity | 7 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class LocalizedRouteDetector |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var RouteCollection |
||
| 24 | */ |
||
| 25 | private $routeCollection; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var RequestContext |
||
| 29 | */ |
||
| 30 | private $context; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param RouterInterface $router |
||
| 34 | */ |
||
| 35 | 21 | public function __construct(RouterInterface $router) |
|
| 39 | 21 | } |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @see \Symfony\Component\Routing\Generator\UrlGenerator::generate |
||
| 43 | * Note: UrlGenerator uses $defaultLocale parameter when determining locale for url generation, but |
||
| 44 | * a) it's never passed to UrlGenerator constructor - see \Symfony\Component\Routing\Router::getGenerator |
||
| 45 | * b) we have no way to retrieve it |
||
| 46 | * |
||
| 47 | * @param string $name |
||
| 48 | * @param array $parameters |
||
| 49 | * |
||
| 50 | * @return string|null |
||
| 51 | */ |
||
| 52 | 21 | public function getLocalizedName($name, array $parameters = []) |
|
| 69 |