SymfonyRouteRouterFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 15
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WShafer\Expressive\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\Expressive\Symfony\Router\Cache\Cache;
12
13
class SymfonyRouteRouterFactory
14
{
15 1
    public function __invoke(ContainerInterface $container) : SymfonyRouteRouter
16
    {
17 1
        $urlMatcher = $container->get(UrlMatcher::class);
18
19 1
        $urlGenerator = $container->get(UrlGenerator::class);
20
21 1
        $routes = $container->get(RouteCollection::class);
22
23 1
        $cache = $container->get(Cache::class);
24
25 1
        return new SymfonyRouteRouter($routes, $urlMatcher, $urlGenerator, $cache);
26
    }
27
}
28