chore: more specific return type for chunk() method #1958
Annotations
12 errors
InvalidReturnType:
src/Operation/Chunk.php#L33
src/Operation/Chunk.php:33:28: InvalidReturnType: The declared return type 'Generator<int, non-empty-list<T:loophp\collection\Operation\Chunk as mixed>, mixed, mixed>' for /home/runner/work/collection/collection/src/operation/chunk.php:35:755:-:closure is incorrect, got 'Generator<int, non-empty-list<(T:loophp\collection\Operation\Chunk as mixed)|loophp\collection\Operation\T>, mixed, void>' (see https://psalm.dev/011)
|
Static Analysis (ubuntu-latest, 8.1)
Process completed with exit code 1.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L102
Method loophp\collection\Collection::coalesce() should return loophp\collection\Contract\Collection<TKey, T> but returns loophp\collection\Collection<mixed, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L107
Method loophp\collection\Collection::collapse() should return loophp\collection\Contract\Collection<TKey, T> but returns loophp\collection\Collection<mixed, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L164
Method loophp\collection\Collection::cycle() should return loophp\collection\Contract\Collection<TKey, T> but returns loophp\collection\Collection<mixed, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L311
Method loophp\collection\Collection::flip() should return loophp\collection\Contract\Collection<T, TKey> but returns loophp\collection\Collection<mixed, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L341
Method loophp\collection\Collection::frequency() should return loophp\collection\Contract\Collection<int, T> but returns loophp\collection\Collection<int, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L467
Method loophp\collection\Collection::init() should return loophp\collection\Contract\Collection<TKey, T> but returns loophp\collection\Collection<mixed, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L515
Method loophp\collection\Collection::keys() should return loophp\collection\Contract\Collection<int, TKey> but returns loophp\collection\Collection<int, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L570
Method loophp\collection\Collection::normalize() should return loophp\collection\Contract\Collection<int, T> but returns loophp\collection\Collection<int, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L595
Method loophp\collection\Collection::pair() should return loophp\collection\Contract\Collection<T, T|null> but returns loophp\collection\Collection<mixed, mixed>.
|
Static Analysis (ubuntu-latest, 8.1):
src/Collection.php#L666
Method loophp\collection\Collection::reverse() should return loophp\collection\Contract\Collection<TKey, T> but returns loophp\collection\Collection<mixed, mixed>.
|