StreamModule::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
c 0
b 0
f 0
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * This file is part of the BEAR.Streamer package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace BEAR\Streamer;
8
9
use BEAR\Resource\RenderInterface;
10
use BEAR\Resource\TransferInterface;
11
use BEAR\Streamer\Annotation\Stream;
12
use Ray\Di\AbstractModule;
13
use Ray\Di\Scope;
14
15
class StreamModule extends AbstractModule
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 4
    protected function configure()
21
    {
22 4
        $this->bind(RenderInterface::class)->annotatedWith(Stream::class)->to(StreamRenderer::class);
23 4
        $this->bind()->annotatedWith(Stream::class)->toProvider(StreamProvider::class)->in(Scope::SINGLETON);
24 4
        $this->bind(StreamerInterface::class)->to(Streamer::class)->in(Scope::SINGLETON);
25 4
        $this->bind(TransferInterface::class)->annotatedWith(Stream::class)->to(StreamResponder::class);
26 4
    }
27
}
28