Skip to content

refactor: rewrite RandomIterableAggregate to avoid recursion #295

refactor: rewrite RandomIterableAggregate to avoid recursion

refactor: rewrite RandomIterableAggregate to avoid recursion #295

Triggered via pull request January 27, 2024 17:15
Status Failure
Total duration 30s
Artifacts

static-analysis.yml

on: pull_request
Matrix: Static Analysis
Fit to window
Zoom out
Zoom in

Annotations

20 errors and 1 warning
Static Analysis (ubuntu-latest, 8.1): src/RandomIterableAggregate.php#L31
Parameter #1 $iterable of class loophp\iterators\UnpackIterableAggregate constructor expects iterable<(int|string), array{mixed, mixed}>, loophp\iterators\MultipleIterableAggregate<mixed, mixed> given.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L14
Class loophp\iterators\ShuffleIteratorAggregate implements generic interface IteratorAggregate but does not specify its types: TKey, TValue
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L16
Property loophp\iterators\ShuffleIteratorAggregate::$numbers is never read, only written.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L16
Property loophp\iterators\ShuffleIteratorAggregate::$numbers type has no value type specified in iterable type array.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L18
Property loophp\iterators\ShuffleIteratorAggregate::$seed is never read, only written.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L32
Method loophp\iterators\ShuffleIteratorAggregate::shuffle() has parameter $numbers with no value type specified in iterable type array.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L32
Method loophp\iterators\ShuffleIteratorAggregate::shuffle() return type has no value type specified in iterable type array.
InvalidArgument: src/RandomIterableAggregate.php#L31
src/RandomIterableAggregate.php:31:42: InvalidArgument: Argument 1 of loophp\iterators\UnpackIterableAggregate::__construct expects iterable<array-key, array{0: mixed, 1: mixed}>, but loophp\iterators\MultipleIterableAggregate<int, array{0: TKey:loophp\iterators\RandomIterableAggregate as mixed, 1: T:loophp\iterators\RandomIterableAggregate as mixed}> provided (see https://psalm.dev/004)
MissingTemplateParam: src/ShuffleIteratorAggregate.php#L14
src/ShuffleIteratorAggregate.php:14:49: MissingTemplateParam: loophp\iterators\ShuffleIteratorAggregate has missing template params when extending IteratorAggregate, expecting 2 (see https://psalm.dev/182)
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/RandomIterableAggregate.php#L31
Parameter #1 $iterable of class loophp\iterators\UnpackIterableAggregate constructor expects iterable<(int|string), array{mixed, mixed}>, loophp\iterators\MultipleIterableAggregate<mixed, mixed> given.
Static Analysis (ubuntu-latest, 8.1): src/RandomIterableAggregate.php#L35
Parameter #2 $callback of class loophp\iterators\SortIterableAggregate constructor expects Closure(mixed, mixed, mixed, mixed): int, Closure(array, array, int, int): int<-1, 1> given.
Static Analysis (ubuntu-latest, 8.1): src/RandomIterableAggregate.php#L38
Parameter #1 $iterable of class loophp\iterators\UnpackIterableAggregate constructor expects iterable<(int|string), array{TKey, T}>, loophp\iterators\SortIterableAggregate<mixed, mixed> given.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L14
Class loophp\iterators\ShuffleIteratorAggregate implements generic interface IteratorAggregate but does not specify its types: TKey, TValue
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L16
Property loophp\iterators\ShuffleIteratorAggregate::$numbers is never read, only written.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L16
Property loophp\iterators\ShuffleIteratorAggregate::$numbers type has no value type specified in iterable type array.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L18
Property loophp\iterators\ShuffleIteratorAggregate::$seed is never read, only written.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L32
Method loophp\iterators\ShuffleIteratorAggregate::shuffle() has parameter $numbers with no value type specified in iterable type array.
Static Analysis (ubuntu-latest, 8.1): src/ShuffleIteratorAggregate.php#L32
Method loophp\iterators\ShuffleIteratorAggregate::shuffle() return type has no value type specified in iterable type array.
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/.