Completed
Pull Request — 1.x (#9)
by Akihito
04:16 queued 03:14
created

StreamModule   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 1
1
<?php
2
/**
3
 * This file is part of the BEAR.Middleware package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace BEAR\Middleware\Module;
8
9
use BEAR\Middleware\Annotation\Stream;
10
use BEAR\Resource\RenderInterface;
11
use Ray\Di\AbstractModule;
12
use Ray\Di\Scope;
13
14
class StreamModule extends AbstractModule
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    protected function configure()
20
    {
21
        $this->rename(RenderInterface::class, 'original');
22
        $this->bind(RenderInterface::class)->to(StreamRenderer::class)->in(Scope::SINGLETON);
23
        $this->bind()->annotatedWith(Stream::class)->toProvider(StreamProvider::class)->in(Scope::SINGLETON);
24
    }
25
}
26