RouterFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
c 3
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
/**
3
 * Dash
4
 *
5
 * @link      http://github.com/DASPRiD/Dash For the canonical source repository
6
 * @copyright 2013-2015 Ben Scholzen 'DASPRiD'
7
 * @license   http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
8
 */
9
10
namespace Dash;
11
12
use Interop\Container\ContainerInterface;
13
14
/**
15
 * Factory for the default router.
16
 */
17
class RouterFactory
18
{
19
    /**
20
     * {@inheritdoc}
21
     *
22
     * @return Router
23
     */
24
    public function __invoke(ContainerInterface $container)
25
    {
26
        return new Router(
27
            $container->get('DashRootRouteCollection'),
28
            $container->get('DashBaseUri')
29
        );
30
    }
31
}
32