AuraInputModule   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 15 1
1
<?php
2
/**
3
 * This file is part of the Ray.ValidateModule package
4
 *
5
 * @license http://opensource.org/licenses/bsd-license.php BSD
6
 */
7
namespace Ray\Validation;
8
9
use Aura\Filter\SubjectFilter;
10
use Aura\Filter\ValueFilter;
11
use Aura\Html\HelperLocatorFactory;
12
use Aura\Input\Builder;
13
use Aura\Input\BuilderInterface;
14
use Aura\Input\Filter;
15
use Aura\Input\FilterInterface;
16
use Aura\Input\Form;
17
use Ray\Di\AbstractModule;
18
use Ray\Validation\Annotation\AuraInput;
19
20
class AuraInputModule extends AbstractModule
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    protected function configure()
26
    {
27
        $this->install(new ValidateModule);
28
        $this->bind(BuilderInterface::class)->to(Builder::class);
29
        $this->bind(Filter::class)->toProvider(FilterProvider::class);
30
        $this->bind(FilterInterface::class)->to(Filter::class);
31
        $this->bind(ValueFilter::class)->toProvider(ValueFilterProvider::class);
32
        $this->bind(SubjectFilter::class)->toProvider(SubjectFilterProvider::class);
33
        $this->bind(HelperLocatorFactory::class);
34
        $this->bindInterceptor(
35
            $this->matcher->any(),
36
            $this->matcher->annotatedWith(AuraInput::class),
37
            [AuraInputInterceptor::class]
38
        );
39
    }
40
}
41