Passed
Push — 1.x.x ( 769858...6e6b4c )
by Koldo
02:22
created

AuraSessionSegment::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\Session\Infrastructure;
6
7
use Antidot\Session\Application\Http\SessionSegment;
8
use Aura\Session\Segment;
9
10
class AuraSessionSegment implements SessionSegment
11
{
12
    private Segment $segment;
13
14 6
    public function __construct(Segment $segment)
15
    {
16 6
        $this->segment = $segment;
17 6
    }
18
19 1
    public function get(string $identity)
20
    {
21 1
        return $this->segment->get($identity);
22
    }
23
24 1
    public function getFlash(string $identity)
25
    {
26 1
        return $this->segment->getFlash($identity);
27
    }
28
29 1
    public function set(string $identity, $value): void
30
    {
31 1
        $this->segment->set($identity, $value);
32 1
    }
33
34 1
    public function setFlash(string $identity, $value): void
35
    {
36 1
        $this->segment->setFlash($identity, $value);
37 1
    }
38
}
39