• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codeigniter4 / CodeIgniter4 / 20696078137

04 Jan 2026 04:50PM UTC coverage: 85.508% (+0.01%) from 85.498%
20696078137

Pull #9862

github

web-flow
Merge fb71fb460 into 5f104f6cc
Pull Request #9862: feat: make DebugToolbar smarter about detecting binary/streamed responses

13 of 14 new or added lines in 2 files covered. (92.86%)

60 existing lines in 5 files now uncovered.

21831 of 25531 relevant lines covered (85.51%)

204.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/system/Session/Handlers/ArrayHandler.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of CodeIgniter 4 framework.
7
 *
8
 * (c) CodeIgniter Foundation <admin@codeigniter.com>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
namespace CodeIgniter\Session\Handlers;
15

16
use ReturnTypeWillChange;
17

18
/**
19
 * Session handler using static array for storage.
20
 * Intended only for use during testing.
21
 */
22
class ArrayHandler extends BaseHandler
23
{
24
    /**
25
     * @var array<string, mixed>
26
     */
27
    protected static $cache = [];
28

29
    /**
30
     * Re-initialize existing session, or creates a new one.
31
     *
32
     * @param string $path The path where to store/retrieve the session.
33
     * @param string $name The session name.
34
     */
35
    public function open($path, $name): bool
36
    {
UNCOV
37
        return true;
×
38
    }
39

40
    /**
41
     * Reads the session data from the session storage, and returns the results.
42
     *
43
     * @param string $id The session ID.
44
     *
45
     * @return false|string Returns an encoded string of the read data.
46
     *                      If nothing was read, it must return false.
47
     */
48
    #[ReturnTypeWillChange]
49
    public function read($id)
50
    {
UNCOV
51
        return '';
×
52
    }
53

54
    /**
55
     * Writes the session data to the session storage.
56
     *
57
     * @param string $id   The session ID.
58
     * @param string $data The encoded session data.
59
     */
60
    public function write($id, $data): bool
61
    {
UNCOV
62
        return true;
×
63
    }
64

65
    /**
66
     * Closes the current session.
67
     */
68
    public function close(): bool
69
    {
UNCOV
70
        return true;
×
71
    }
72

73
    /**
74
     * Destroys a session.
75
     *
76
     * @param string $id The session ID being destroyed.
77
     */
78
    public function destroy($id): bool
79
    {
UNCOV
80
        return true;
×
81
    }
82

83
    /**
84
     * Cleans up expired sessions.
85
     *
86
     * @param int $max_lifetime Sessions that have not updated
87
     *                          for the last max_lifetime seconds will be removed.
88
     *
89
     * @return false|int Returns the number of deleted sessions on success, or false on failure.
90
     */
91
    #[ReturnTypeWillChange]
92
    public function gc($max_lifetime)
93
    {
UNCOV
94
        return 1;
×
95
    }
96
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc