Issues (85)

src/Contract/Operation/CountInAble.php (1 issue)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace loophp\collection\Contract\Operation;
6
7
use loophp\collection\Contract\Collection;
8
9
/**
10
 * @template TKey
11
 * @template T
12
 */
13
interface CountInAble
14
{
15
    /**
16
     * This operation requires a reference to a parameter that will contain the
17
     * amount of items in the collection. The difference with the `count`
18
     * operation is that the `count` operation will return the amount of items
19
     * in the collection and the `countIn` operation will yield over the
20
     * collection itself while updating the counter variable.
21
     *
22
     * @see https://loophp-collection.readthedocs.io/en/stable/pages/api.html#countIn
23
     *
24
     * @param non-negative-int $counter
0 ignored issues
show
Documentation Bug introduced by
The doc comment non-negative-int at position 0 could not be parsed: Unknown type name 'non-negative-int' at position 0 in non-negative-int.
Loading history...
25
     *
26
     * @return Collection<TKey, T>
27
     */
28
    public function countIn(int &$counter): Collection;
29
}
30