Skip to content

Commit

Permalink
fix: update Psalm baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 17, 2023
1 parent 2ccd67f commit c0ef374
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
22 changes: 5 additions & 17 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
<files psalm-version="5.18.0@b113f3ed0259fd6e212d87c3df80eec95a6abf19">
<file src="src/Collection.php">
<MixedArgument>
<code>(new Operation\Product())()(...$iterables)</code>
<code>(new Operation\Combinate())()($length)</code>
</MixedArgument>
<InvalidArgument>
<code>$callback</code>
<code>$callbacks</code>
Expand Down Expand Up @@ -41,6 +37,10 @@
<code>CollectionInterface</code>
<code>CollectionInterface</code>
</InvalidReturnType>
<MixedArgument>
<code>(new Operation\Combinate())()($length)</code>
<code>(new Operation\Product())()(...$iterables)</code>
</MixedArgument>
<PossiblyNullArgument>
<code>$default</code>
<code>$default</code>
Expand All @@ -65,18 +65,6 @@
<code>$callbacks</code>
</InvalidArgument>
</file>
<file src="src/Operation/Dispersion.php">
<InvalidReturnStatement>
<code>[(0 === $key) ? 0 : (($c * ($key - 1) + (($v === $value) ? 0 : 1)) / $key), $value]</code>
</InvalidReturnStatement>
<InvalidReturnType>
<code><![CDATA[array<float|int<0,1>, T>]]></code>
</InvalidReturnType>
<MismatchingDocblockParamType>
<code><![CDATA[array<float|int<0,1>, T>]]></code>
<code><![CDATA[array<float|int<0,1>, T|null>]]></code>
</MismatchingDocblockParamType>
</file>
<file src="src/Operation/Entropy.php">
<InvalidArgument>
<code><![CDATA[static fn (float $acc, float $p, int $_, Collection $c): float => 0 === $key ? $acc : $acc - $p * log($p, 2) / ((1 === $count = $c->count()) ? 1 : log($count, 2))]]></code>
Expand Down
6 changes: 3 additions & 3 deletions src/Operation/Dispersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public function __invoke(): Closure
(new Normalize())(),
(new ScanLeft())()(
/**
* @param array<float|int<0,1>, T|null> $acc
* @param array<numeric-string|int<0,1>, T> $acc
* @param T $value
*
* @return array<float|int<0,1>, T>
* @return list{float|int<0,1>, T}
*/
static function (array $acc, mixed $value, int $key): array {
[$c, $v] = $acc;
Expand All @@ -39,7 +39,7 @@ static function (array $acc, mixed $value, int $key): array {
(new Drop())()(1),
(new Map())()(
/**
* @param array<float|int<0,1>, T> $value
* @param array<numeric-string|int<0,1>, T> $value
*
* @return float|int<0,1>
*/
Expand Down

0 comments on commit c0ef374

Please sign in to comment.