MockSessionModule   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
1
<?php
2
3
namespace Ray\SymfonySessionModule;
4
5
use Ray\Di\AbstractModule;
6
use Symfony\Component\HttpFoundation\Session\Session;
7
use Symfony\Component\HttpFoundation\Session\SessionInterface;
8
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
9
10
class MockSessionModule extends AbstractModule
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15 6
    protected function configure()
16
    {
17 6
        $this->bind(SessionInterface::class)->toInstance(new Session(new MockArraySessionStorage));
18 6
    }
19
}
20