Passed
Push — master ( 3c979b...72c793 )
by Kirill
03:02
created

NullHandler   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A write() 0 3 1
A open() 0 3 1
A destroy() 0 3 1
A close() 0 3 1
A gc() 0 3 1
A read() 0 3 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Session\Handler;
13
14
/**
15
 * Blackhole.
16
 */
17
final class NullHandler implements \SessionHandlerInterface
18
{
19
    /**
20
     * @inheritdoc
21
     */
22
    public function close(): bool
23
    {
24
        return true;
25
    }
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function destroy($session_id): bool
31
    {
32
        return true;
33
    }
34
35
    /**
36
     * @inheritdoc
37
     */
38
    public function gc($maxlifetime): bool
39
    {
40
        return true;
41
    }
42
43
    /**
44
     * @inheritdoc
45
     */
46
    public function open($save_path, $session_id): bool
47
    {
48
        return true;
49
    }
50
51
    /**
52
     * @inheritdoc
53
     */
54
    public function read($session_id): string
55
    {
56
        return '';
57
    }
58
59
    /**
60
     * @inheritdoc
61
     */
62
    public function write($session_id, $session_data): bool
63
    {
64
        return true;
65
    }
66
}
67