Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| CountableFilterIterator | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(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 | |
| 19 | namespace FastForward\Iterator; |
| 20 | |
| 21 | use Countable; |
| 22 | use FilterIterator; |
| 23 | |
| 24 | /** |
| 25 | * Provides a filter iterator implementation that is also countable. |
| 26 | * |
| 27 | * This abstract class SHALL extend {@see FilterIterator} so that concrete |
| 28 | * implementations MAY filter elements from an inner iterator while also |
| 29 | * exposing count semantics. The counting behavior MUST be provided through |
| 30 | * the composed trait and SHALL operate according to the characteristics of |
| 31 | * the wrapped inner iterator. Implementations SHOULD ensure that their |
| 32 | * filtering logic remains consistent with the sequence being counted. |
| 33 | */ |
| 34 | abstract class CountableFilterIterator extends FilterIterator implements Countable |
| 35 | { |
| 36 | use CountableIteratorIteratorTrait; |
| 37 | } |