Skip to content

feat: add entropy operation #1837

feat: add entropy operation

feat: add entropy operation #1837

Triggered via pull request November 16, 2023 22:15
Status Failure
Total duration 1m 0s
Artifacts

static-analysis.yml

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

Annotations

15 errors
Static Analysis (ubuntu-latest, 8.1): src/Operation/Entropy.php#L37
Parameter #1 $callback of method loophp\collection\Contract\Operation\Reduceable<int,float>::reduce() expects callable(float|int, float, int, iterable<int, float>): (float|int), Closure(float, float, int, loophp\collection\Collection): float given.
InvalidArgument: src/Operation/Entropy.php#L29
src/Operation/Entropy.php:29:17: InvalidArgument: Argument 1 expects callable(mixed, mixed, iterable<mixed, mixed>):mixed, but impure-Closure(mixed, int, loophp\collection\Collection):(0|float) provided (see https://psalm.dev/004)
InvalidArgument: src/Operation/Entropy.php#L37
src/Operation/Entropy.php:37:25: InvalidArgument: Argument 1 of loophp\collection\Contract\Collection::reduce expects callable(float, float|int, int, iterable<int, float|int>):mixed, but impure-Closure(float, float|int, int, loophp\collection\Collection):float provided (see https://psalm.dev/004)
UnusedBaselineEntry: src/Operation/Entropy.php#L1
src/Operation/Entropy.php:0:0: UnusedBaselineEntry: Baseline for issue "InvalidArgument" has 1 extra entry. (see https://psalm.dev/316)
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#L308
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#L318
Parameter #1 $ of closure expects callable(mixed, mixed, mixed, iterable): mixed, callable(T|V, T, TKey, iterable<TKey, T>): V given.
Static Analysis (ubuntu-latest, 8.1): src/Collection.php#L328
Parameter #1 $ of closure expects callable(mixed, mixed, mixed, iterable): mixed, callable(T|V, T, TKey, iterable<TKey, T>): V given.
Static Analysis (ubuntu-latest, 8.1): src/Collection.php#L338
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#L464
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#L512
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#L567
Method loophp\collection\Collection::normalize() should return loophp\collection\Contract\Collection<int, T> but returns loophp\collection\Collection<int, mixed>.