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

codeigniter4 / CodeIgniter4 / 25468486510

07 May 2026 12:15AM UTC coverage: 88.19% (-0.01%) from 88.204%
25468486510

Pull #10169

github

web-flow
Merge 0fd35c524 into 6c4acef98
Pull Request #10169: test: make Commands tests random-order safe

5 of 7 new or added lines in 3 files covered. (71.43%)

2 existing lines in 1 file now uncovered.

22110 of 25071 relevant lines covered (88.19%)

209.37 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