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

NullHandler::write()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
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