RouterModule::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Sunday\Provide\Router;
6
7
use BEAR\Sunday\Annotation\DefaultSchemeHost;
8
use BEAR\Sunday\Extension\Router\RouterInterface;
9
use Ray\Di\AbstractModule;
10
11
/**
12
 * Provides RouterInterface and derived bindings
13
 *
14
 * The following bindings are provided:
15
 *
16 2
 *  RouterInterface
17
 *  -DefaultSchemeHost
18 2
 */
19 2
class RouterModule extends AbstractModule
20 2
{
21
    protected function configure(): void
22
    {
23
        $this->bind(RouterInterface::class)->to(WebRouter::class);
24
        $this->bind()->annotatedWith(DefaultSchemeHost::class)->toInstance('page://self');
25
    }
26
}
27