RouterFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 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