SessionAdapter::set()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
cc 1
eloc 2
nc 1
nop 2
crap 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