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

nette / component-model / 21196680391

21 Jan 2026 03:57AM UTC coverage: 87.448% (+2.3%) from 85.116%
21196680391

push

github

dg
attached handles are called top-down (ancestor → descendant) (BC break)

50 of 55 new or added lines in 1 file covered. (90.91%)

10 existing lines in 2 files now uncovered.

209 of 239 relevant lines covered (87.45%)

0.87 hits per line

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

66.67
/src/ComponentModel/RecursiveComponentIterator.php
1
<?php
2

3
/**
4
 * This file is part of the Nette Framework (https://nette.org)
5
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6
 */
7

8
declare(strict_types=1);
9

10
namespace Nette\ComponentModel;
11

12
use function iterator_count;
13

14

15
/**
16
 * Recursive component iterator. See Container::getComponents().
17
 * @internal
18
 * @extends \RecursiveArrayIterator<int|string, IComponent>
19
 */
20
final class RecursiveComponentIterator extends \RecursiveArrayIterator implements \Countable
21
{
22
        /**
23
         * Has the current element has children?
24
         */
25
        public function hasChildren(): bool
26
        {
27
                return $this->current() instanceof IContainer;
1✔
28
        }
29

30

31
        /**
32
         * The sub-iterator for the current element.
33
         */
34
        public function getChildren(): self
35
        {
36
                return new self($this->current()->getComponents());
1✔
37
        }
38

39

40
        /**
41
         * Returns the count of elements.
42
         */
43
        public function count(): int
44
        {
UNCOV
45
                return iterator_count($this);
×
46
        }
47
}
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