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

Dummy   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 54
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A open() 0 4 1
A close() 0 4 1
A read() 0 4 1
A write() 0 4 1
A destroy() 0 4 1
A gc() 0 4 1
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