Passed
Push — decouple_from_aura ( 86867c )
by Koldo
03:06
created

AuraSessionSegment   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 27
ccs 12
cts 12
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setFlash() 0 3 1
A set() 0 3 1
A getFlash() 0 3 1
A get() 0 3 1
A __construct() 0 3 1
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