Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
CountableIteratorIterator
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/**
6 * This file is part of php-fast-forward/iterators.
7 *
8 * This source file is subject to the license that is bundled
9 * with this source code in the file LICENSE.
10 *
11 * @copyright Copyright (c) 2025-2026 Felipe SayĆ£o Lobato Abreu <github@mentordosnerds.com>
12 * @license   https://opensource.org/licenses/MIT MIT License
13 *
14 * @see       https://github.com/php-fast-forward/iterators
15 * @see       https://github.com/php-fast-forward
16 * @see       https://datatracker.ietf.org/doc/html/rfc2119
17 */
18
19namespace FastForward\Iterator;
20
21use Countable;
22use IteratorIterator;
23
24/**
25 * Provides an iterator wrapper that is also countable.
26 *
27 * This class SHALL extend {@see IteratorIterator} to decorate an existing iterator while
28 * exposing counting behavior through the composed trait. The wrapped iterator MUST be
29 * compatible with the expectations of {@see IteratorIterator}, and consumers SHOULD rely
30 * on this class when they need both traversal and count semantics from a single object.
31 */
32class CountableIteratorIterator extends IteratorIterator implements Countable
33{
34    use CountableIteratorIteratorTrait;
35}