Completed
Pull Request — 2.x (#29)
by Akihito
01:35
created

TwigErrorPageModule   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 13
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 7 1
1
<?php
2
/**
3
 * This file is part of the Madapaja.TwigModule package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace Madapaja\TwigModule;
8
9
use BEAR\Resource\RenderInterface;
10
use BEAR\Sunday\Extension\Error\ErrorInterface;
11
use Madapaja\TwigModule\Annotation\TwigErrorPath;
12
use Ray\Di\AbstractModule;
13
14
class TwigErrorPageModule extends AbstractModule
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    protected function configure()
20
    {
21
        $this->bind(RenderInterface::class)->annotatedWith('error_page')->to(ErrorPagerRenderer::class);
22
        $this->bind(ErrorInterface::class)->to(TwigErrorHandler::class);
23
        $this->bind()->annotatedWith(TwigErrorPath::class)->toInstance('/error/error.html.twig');
24
        $this->bind(TwigErrorPage::class);
25
    }
26
}
27