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

nette / component-model / 7159790815

10 Dec 2023 07:11PM UTC coverage: 85.714% (-0.2%) from 85.922%
7159790815

push

github

dg
Container::getComponents() parameters $deep and $filterType are deprecated (BC break)

3 of 3 new or added lines in 1 file covered. (100.0%)

29 existing lines in 4 files now uncovered.

186 of 217 relevant lines covered (85.71%)

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

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

27

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

36

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