SymfonyRouteRouterFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WShafer\Mezzio\Symfony\Router;
6
7
use Psr\Container\ContainerInterface;
8
use Symfony\Component\Routing\Generator\UrlGenerator;
9
use Symfony\Component\Routing\Matcher\UrlMatcher;
10
use Symfony\Component\Routing\RouteCollection;
11
use WShafer\Mezzio\Symfony\Router\Cache\Cache;
12
13
class SymfonyRouteRouterFactory
14
{
15
    public function __invoke(ContainerInterface $container): SymfonyRouteRouter
16
    {
17
        $urlMatcher = $container->get(UrlMatcher::class);
18
19
        $urlGenerator = $container->get(UrlGenerator::class);
20
21
        $routes = $container->get(RouteCollection::class);
22
23
        $cache = $container->get(Cache::class);
24
25
        return new SymfonyRouteRouter($routes, $urlMatcher, $urlGenerator, $cache);
26
    }
27
}
28