Completed
Push — 8.7 ( b6d8c1...3ac046 )
by Markus
06:49
created

RequestStateStore   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 1
b 0
f 0
dl 0
loc 19
rs 10

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
    public function __construct(PhpSession $session)
16
    {
17
        $this->session = $session;
18
    }
19
20
    protected function getArray()
21
    {
22
        return $this->session->get(self::SESSION_KEY);
23
    }
24
25
    protected function setArray(array $arr): void
26
    {
27
        $this->session->set(self::SESSION_KEY, $arr);
28
    }
29
}
30