Issues (85)

src/Contract/Operation/Pluckable.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 Pluckable
14
{
15
    /**
16
     * Retrieves all of the values of a collection for a given key.
17
     * Nested values can be retrieved using “dot notation” and the wildcard character `*`.
18
     *
19
     * @see https://loophp-collection.readthedocs.io/en/stable/pages/api.html#pluck
20
     *
21
     * @param array<int, string>|array-key $pluck
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<int, string>|array-key at position 7 could not be parsed: Unknown type name 'array-key' at position 7 in array<int, string>|array-key.
Loading history...
22
     *
23
     * @return Collection<int, iterable<int, T>|T>
24
     */
25
    public function pluck(mixed $pluck, mixed $default = null): Collection;
26
}
27