Skip to content

Commit

Permalink
sa: update baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Feb 18, 2024
1 parent 03766c6 commit 825e282
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
25 changes: 21 additions & 4 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,17 @@
<code><![CDATA[(new Operation\Combinate())()($length)]]></code>
<code><![CDATA[(new Operation\Product())()(...$iterables)]]></code>
</MixedArgument>
<PossiblyNullArgument>
<code>$default</code>
<code>$default</code>
</PossiblyNullArgument>
</file>
<file src="src/Enum/Combinators.php">
<MissingClosureParamType>
<code><![CDATA[$a]]></code>
<code><![CDATA[$a]]></code>
<code><![CDATA[$a]]></code>
<code><![CDATA[$args]]></code>
<code><![CDATA[$args]]></code>
<code><![CDATA[$b]]></code>
<code><![CDATA[$b]]></code>
</MissingClosureParamType>
</file>
<file src="src/Operation/All.php">
<InvalidReturnStatement>
Expand Down Expand Up @@ -154,6 +161,16 @@
<code><![CDATA[$left]]></code>
</PossiblyUndefinedArrayOffset>
</file>
<file src="tests/static-analysis/scanLeft1.php">
<InvalidArgument>
<code><![CDATA[Collection::fromIterable(array_combine(range('a', 'e'), range('a', 'e')))->scanLeft1(static fn (int|string $carry, string $value): int => ord($value))]]></code>
</InvalidArgument>
</file>
<file src="tests/static-analysis/scanRight1.php">
<InvalidArgument>
<code><![CDATA[Collection::fromIterable(array_combine(range('a', 'e'), range('a', 'e')))->scanRight1(static fn (int|string $carry, string $value): int => ord($value))]]></code>
</InvalidArgument>
</file>
<file src="tests/static-analysis/span.php">
<PossiblyUndefinedArrayOffset>
<code><![CDATA[$left]]></code>
Expand Down
12 changes: 1 addition & 11 deletions tests/static-analysis/scanLeft1.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,4 @@ static function (): Generator {
// see Psalm bug: https://github.com/vimeo/psalm/issues/6108
scanLeft1_checkListString(Collection::fromIterable(range('a', 'c'))->scanLeft1($concat));
scanLeft1_checkListOfSize1String(Collection::fromIterable($intGenerator())->scanLeft1($toString));
scanLeft1_checkMixedInput(
Collection::fromIterable(array_combine(range('a', 'e'), range('a', 'e')))
->scanLeft1(
/**
* @param int<0, 255>|string $carry
*
* @return int<0, 255>
*/
static fn (int|string $carry, string $value): int => ord($value)
)
);
scanLeft1_checkMixedInput(Collection::fromIterable(array_combine(range('a', 'e'), range('a', 'e')))->scanLeft1(static fn (int|string $carry, string $value): int => ord($value)));

0 comments on commit 825e282

Please sign in to comment.