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

nette / component-model / 15762957805

19 Jun 2025 05:00PM UTC coverage: 85.514%. Remained the same
15762957805

push

github

dg
removed attached() & detached() methods (BC break)

1 of 2 new or added lines in 1 file covered. (50.0%)

25 existing lines in 4 files now uncovered.

183 of 214 relevant lines covered (85.51%)

0.86 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
 */
19
final class RecursiveComponentIterator extends \RecursiveArrayIterator implements \Countable
20
{
21
        /**
22
         * Has the current element has children?
23
         */
24
        public function hasChildren(): bool
25
        {
26
                return $this->current() instanceof IContainer;
1✔
27
        }
28

29

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

38

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

© 2025 Coveralls, Inc