SessionalModule   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 16 1
1
<?php
2
3
namespace Ray\SymfonySessionModule;
4
5
use Ray\Di\AbstractModule;
6
use Ray\SymfonySessionModule\Annotation\Sessional;
7
8
class SessionalModule extends AbstractModule
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 5
    protected function configure()
14
    {
15
        // Class annotated with @Sessional
16 5
        $this->bindInterceptor(
17 5
            $this->matcher->annotatedWith(Sessional::class),
18 5
            $this->matcher->any(),
19 5
            [SessionalInterceptor::class]
20 5
        );
21
22
        // Method annotated with @Sessional
23 5
        $this->bindInterceptor(
24 5
            $this->matcher->any(),
25 5
            $this->matcher->annotatedWith(Sessional::class),
26 5
            [SessionalInterceptor::class]
27 5
        );
28 5
    }
29
}
30