refactor: rewrite RandomIterableAggregate
to avoid recursion
#307
Annotations
17 errors and 1 warning
Static Analysis (ubuntu-latest, 8.1):
src/RandomIntegerAggregate.php#L35
While loop condition is always true.
|
Static Analysis (ubuntu-latest, 8.1):
src/RandomIntegerAggregate.php#L36
Generator expects key type TKey, int given.
|
Static Analysis (ubuntu-latest, 8.1):
src/RandomIntegerAggregate.php#L36
Generator expects value type T, int given.
|
Static Analysis (ubuntu-latest, 8.1):
src/RandomIterableAggregate.php#L30
Parameter #1 $iterable of class loophp\iterators\UnpackIterableAggregate constructor expects iterable<(int|string), array{mixed, mixed}>, loophp\iterators\SortIterableAggregate<array<int, mixed>, array<int, mixed>> given.
|
InvalidReturnType:
src/RandomIntegerAggregate.php#L27
src/RandomIntegerAggregate.php:27:16: InvalidReturnType: The declared return type 'Generator<TKey:loophp\iterators\RandomIntegerAggregate as mixed, T:loophp\iterators\RandomIntegerAggregate as mixed, mixed, mixed>' for loophp\iterators\RandomIntegerAggregate::getIterator is incorrect, got 'Generator<int, int<min, max>, mixed, void>' (see https://psalm.dev/011)
|
InvalidArgument:
src/RandomIterableAggregate.php#L30
src/RandomIterableAggregate.php:30:17: InvalidArgument: Argument 1 of loophp\iterators\UnpackIterableAggregate::__construct expects iterable<array-key, array{0: mixed, 1: mixed}>, but loophp\iterators\SortIterableAggregate<array<int, int|mixed>, array<int, (array{0: TKey:loophp\iterators\RandomIterableAggregate as mixed, 1: T:loophp\iterators\RandomIterableAggregate as mixed})|mixed>> provided (see https://psalm.dev/004)
|
Static Analysis (ubuntu-latest, 8.1)
Process completed with exit code 1.
|
Static Analysis (ubuntu-latest, 8.1):
src/IterableIterator.php#L34
Parameter #1 $callable of class loophp\iterators\ClosureIterator constructor expects callable(mixed): iterable, Closure(iterable): Generator<mixed, mixed, mixed, void> given.
|
Static Analysis (ubuntu-latest, 8.1):
src/RandomIntegerAggregate.php#L35
While loop condition is always true.
|
Static Analysis (ubuntu-latest, 8.1):
src/RandomIntegerAggregate.php#L36
Generator expects key type TKey, int given.
|
Static Analysis (ubuntu-latest, 8.1):
src/RandomIntegerAggregate.php#L36
Generator expects value type T, int given.
|
Static Analysis (ubuntu-latest, 8.1):
src/RandomIterableAggregate.php#L30
Parameter #1 $iterable of class loophp\iterators\UnpackIterableAggregate constructor expects iterable<(int|string), array{mixed, mixed}>, loophp\iterators\SortIterableAggregate<array<int, mixed>, array<int, mixed>> given.
|
Static Analysis (ubuntu-latest, 8.1):
src/SortIterableAggregate.php#L57
Cannot access offset 0 on mixed.
|
Static Analysis (ubuntu-latest, 8.1):
src/SortIterableAggregate.php#L57
Cannot access offset 0 on mixed.
|
Static Analysis (ubuntu-latest, 8.1):
src/SortIterableAggregate.php#L57
Cannot access offset 0 on mixed.
|
Static Analysis (ubuntu-latest, 8.1):
src/SortIterableAggregate.php#L57
Cannot access offset 0 on mixed.
|
Static Analysis (ubuntu-latest, 8.1):
src/SortIterableAggregate.php#L57
Cannot access offset 1 on mixed.
|
Static Analysis (ubuntu-latest, 8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|