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

codeigniter4 / CodeIgniter4 / 25686094134

11 May 2026 05:26PM UTC coverage: 88.195% (-0.03%) from 88.223%
25686094134

push

github

web-flow
test: make random component execution safer (#10169)

* test: make random component execution safer

* test: remove unnecessary normalization

Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>

* fix: stabilize cached table names for random tests

Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>

* test: address review feedbacks

Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>

* fix: log factories cache write failures

Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>

* fix: document best-effort log chmod

Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>

---------

Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>

8 of 14 new or added lines in 4 files covered. (57.14%)

2 existing lines in 1 file now uncovered.

22114 of 25074 relevant lines covered (88.19%)

209.98 hits per line

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

77.78
/system/HotReloader/IteratorFilter.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\HotReloader;
15

16
use Config\Toolbar;
17
use RecursiveFilterIterator;
18
use RecursiveIterator;
19

20
/**
21
 * @internal
22
 *
23
 * @psalm-suppress MissingTemplateParam
24
 */
25
final class IteratorFilter extends RecursiveFilterIterator implements RecursiveIterator
26
{
27
    private array $watchedExtensions = [];
28

29
    public function __construct(RecursiveIterator $iterator)
30
    {
31
        parent::__construct($iterator);
4✔
32

33
        $this->watchedExtensions = config(Toolbar::class)->watchedExtensions;
4✔
34
    }
35

36
    /**
37
     * Apply filters to the files in the iterator.
38
     */
39
    public function accept(): bool
40
    {
41
        if (! $this->current()->isFile()) {
4✔
UNCOV
42
            return true;
×
43
        }
44

45
        $filename = $this->current()->getFilename();
4✔
46

47
        // Skip hidden files and directories.
48
        if ($filename[0] === '.') {
4✔
UNCOV
49
            return false;
×
50
        }
51

52
        // Only consume files of interest.
53
        $ext = trim(strtolower($this->current()->getExtension()), '. ');
4✔
54

55
        return in_array($ext, $this->watchedExtensions, true);
4✔
56
    }
57
}
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