RequestStateStore   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 2
b 0
f 0
dl 0
loc 19
rs 10
ccs 7
cts 7
cp 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getArray() 0 3 1
A __construct() 0 3 1
A setArray() 0 3 1
1
<?php
2
3
namespace DMK\MKSamlAuth\Store;
4
5
use DMK\MKSamlAuth\Session\PhpSession;
6
use LightSaml\Store\Request\AbstractRequestStateArrayStore;
7
use TYPO3\CMS\Core\SingletonInterface;
8
9
class RequestStateStore extends AbstractRequestStateArrayStore implements SingletonInterface
10
{
11
    private const SESSION_KEY = 'req_state';
12
13
    private $session;
14
15 2
    public function __construct(PhpSession $session)
16
    {
17 2
        $this->session = $session;
18 2
    }
19
20 2
    protected function getArray()
21
    {
22 2
        return $this->session->get(self::SESSION_KEY);
23
    }
24
25 1
    protected function setArray(array $arr): void
26
    {
27 1
        $this->session->set(self::SESSION_KEY, $arr);
28 1
    }
29
}
30