Completed
Branch 2.x (bcebcf)
by Julián
05:01
created

Dummy::write()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
/*
4
 * sessionware (https://github.com/juliangut/sessionware).
5
 * PSR7 session management middleware.
6
 *
7
 * @license BSD-3-Clause
8
 * @link https://github.com/juliangut/sessionware
9
 * @author Julián Gutiérrez <[email protected]>
10
 */
11
12
namespace Jgut\Middleware\Sessionware\Handler;
13
14
/**
15
 * Dummy session handler.
16
 */
17
class Dummy implements Handler
18
{
19
    use HandlerTrait;
20
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function open($savePath, $sessionName)
25
    {
26
        return true;
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function close()
33
    {
34
        return true;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function read($sessionId)
41
    {
42
        return '';
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    public function write($sessionId, $sessionData)
49
    {
50
        return true;
51
    }
52
53
    /**
54
     * {@inheritdoc}
55
     */
56
    public function destroy($sessionId)
57
    {
58
        return true;
59
    }
60
61
    /**
62
     * {@inheritdoc}
63
     *
64
     * @SuppressWarnings(PMD.ShortMethodName)
65
     */
66
    public function gc($maxLifetime)
67
    {
68
        return true;
69
    }
70
}
71