SessionAdapter   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A set() 0 4 1
A has() 0 4 1
A get() 0 4 1
1
<?php
2
3
namespace SkautisBundle\Skautis;
4
5
use Skautis\SessionAdapter\AdapterInterface;
6
use Symfony\Component\HttpFoundation\Session\SessionInterface;
7
8
/**
9
 * Adapter pro pouziti Symfony Session ve Skautisu
10
 */
11
class SessionAdapter implements AdapterInterface
12
{
13
14
    /**
15
     * @var SessionInterface
16
     */
17
    protected $session;
18
19 1
    public function __construct(SessionInterface $session)
20
    {
21 1
        $this->session = $session;
22 1
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27 1
    public function set($name, $object)
28
    {
29 1
        $this->session->set($name, $object);
30 1
    }
31
32
    /**
33
     * @inheritdoc
34
     */
35 1
    public function has($name)
36
    {
37 1
        return $this->session->has($name);
38
    }
39
40
41
    /**
42
     * @inheritdoc
43
     */
44 1
    public function get($name)
45
    {
46 1
        return $this->session->get($name);
47
    }
48
}
49