Completed
Push — 2.x ( 11343a...e4dad7 )
by Jindřich
02:34
created

SessionAdapter::has()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 0
cts 2
cp 0
cc 1
eloc 2
nc 1
nop 1
crap 2
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
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27 1
    public function set($name, $object)
28
    {
29
        $this->session->set($name, $object);
30 1
    }
31
32
    /**
33
     * @inheritdoc
34
     */
35
    public function has($name)
36
    {
37
        return $this->session->has($name);
38
    }
39
40
41
    /**
42
     * @inheritdoc
43
     */
44
    public function get($name)
45
    {
46
	return $this->session->get($name);
0 ignored issues
show
Coding Style introduced by
It seems like the identation of this line is off (expected at least 8 spaces, but found 4).
Loading history...
47
    }
48
}
49