Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove obsolete All class #338

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@
<code><![CDATA[(new Operation\Product())()(...$iterables)]]></code>
</MixedArgument>
</file>
<file src="src/Operation/All.php">
<InvalidReturnStatement>
<code><![CDATA[static fn (bool $normalize): Closure =>
/**
* @param iterable<TKey, T> $iterable
*
* @return Generator<int, T>|Generator<TKey, T>
*/
static fn (iterable $iterable): Generator => yield from ($normalize ? (new Normalize())()($iterable) : $iterable)]]></code>
</InvalidReturnStatement>
<InvalidReturnType>
<code><![CDATA[Closure(bool): Closure(iterable<TKey, T>): (Generator<int, T>|Generator<TKey, T>)]]></code>
</InvalidReturnType>
</file>
<file src="src/Operation/DropWhile.php">
<InvalidArgument>
<code><![CDATA[$callbacks]]></code>
Expand Down
2 changes: 1 addition & 1 deletion src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

public function all(bool $normalize = true): array
{
return iterator_to_array((new Operation\All())()($normalize)($this));
return iterator_to_array($this, !$normalize);
}

public function append(mixed ...$items): CollectionInterface
Expand Down Expand Up @@ -114,7 +114,7 @@

public function combinate(?int $length = null): CollectionInterface
{
return new self((new Operation\Combinate())()($length), [$this]);

Check failure on line 117 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:117:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)

Check failure on line 117 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:117:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)

Check failure on line 117 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:117:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)

Check failure on line 117 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:117:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)

Check failure on line 117 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:117:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)
}

public function combine(mixed ...$keys): CollectionInterface
Expand Down Expand Up @@ -146,7 +146,7 @@
{
return new self(
(new Operation\Apply())()(
static function () use (&$counter): void {

Check failure on line 149 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:149:17: InvalidArgument: Argument 1 expects callable(mixed, mixed, iterable<mixed, mixed>):bool, but impure-Closure():void provided (see https://psalm.dev/004)

Check failure on line 149 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:149:17: InvalidArgument: Argument 1 expects callable(mixed, mixed, iterable<mixed, mixed>):bool, but impure-Closure():void provided (see https://psalm.dev/004)

Check failure on line 149 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:149:17: InvalidArgument: Argument 1 expects callable(mixed, mixed, iterable<mixed, mixed>):bool, but impure-Closure():void provided (see https://psalm.dev/004)

Check failure on line 149 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:149:17: InvalidArgument: Argument 1 expects callable(mixed, mixed, iterable<mixed, mixed>):bool, but impure-Closure():void provided (see https://psalm.dev/004)

Check failure on line 149 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:149:17: InvalidArgument: Argument 1 expects callable(mixed, mixed, iterable<mixed, mixed>):bool, but impure-Closure():void provided (see https://psalm.dev/004)
++$counter;
}
),
Expand Down Expand Up @@ -267,7 +267,7 @@

public function every(callable ...$callbacks): bool
{
return (new Operation\Every())()(static fn (int $index, mixed $value, mixed $key, iterable $iterable): bool => CallbacksArrayReducer::or()($callbacks)($value, $key, $iterable))($this)

Check failure on line 270 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:270:148: InvalidArgument: Argument 1 expects array<array-key, callable(mixed...):bool>, but array<array-key, callable(T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, iterable<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):bool> provided (see https://psalm.dev/004)

Check failure on line 270 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:270:148: InvalidArgument: Argument 1 expects array<array-key, callable(mixed...):bool>, but array<array-key, callable(T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, iterable<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):bool> provided (see https://psalm.dev/004)

Check failure on line 270 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:270:148: InvalidArgument: Argument 1 expects array<array-key, callable(mixed...):bool>, but array<array-key, callable(T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, iterable<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):bool> provided (see https://psalm.dev/004)

Check failure on line 270 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:270:148: InvalidArgument: Argument 1 expects array<array-key, callable(mixed...):bool>, but array<array-key, callable(T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, iterable<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):bool> provided (see https://psalm.dev/004)

Check failure on line 270 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:270:148: InvalidArgument: Argument 1 expects array<array-key, callable(mixed...):bool>, but array<array-key, callable(T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, iterable<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):bool> provided (see https://psalm.dev/004)
->current();
}

Expand Down Expand Up @@ -595,9 +595,9 @@
return new self((new Operation\Pair())(), [$this]);
}

public function partition(callable ...$callbacks): CollectionInterface

Check failure on line 598 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:598:56: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)

Check failure on line 598 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:598:56: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)

Check failure on line 598 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:598:56: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)

Check failure on line 598 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:598:56: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)

Check failure on line 598 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:598:56: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)
{
return (new self((new Operation\Partition())()(...$callbacks), [$this]))

Check failure on line 600 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:600:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition (see https://psalm.dev/128)

Check failure on line 600 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:600:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition (see https://psalm.dev/128)

Check failure on line 600 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:600:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition (see https://psalm.dev/128)

Check failure on line 600 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:600:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition (see https://psalm.dev/128)

Check failure on line 600 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:600:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::partition (see https://psalm.dev/128)
->map(
/**
* @param iterable<TKey, T> $iterable
Expand Down Expand Up @@ -630,7 +630,7 @@

public function product(iterable ...$iterables): CollectionInterface
{
return new self((new Operation\Product())()(...$iterables), [$this]);

Check failure on line 633 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:633:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)

Check failure on line 633 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:633:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)

Check failure on line 633 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:633:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)

Check failure on line 633 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:633:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)

Check failure on line 633 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

MixedArgument

src/Collection.php:633:25: MixedArgument: Argument 1 of loophp\collection\Collection::__construct cannot be mixed, expecting callable(mixed...):iterable<mixed, mixed> (see https://psalm.dev/030)
}

public function random(int $size = 1, ?int $seed = null): CollectionInterface
Expand Down Expand Up @@ -717,7 +717,7 @@

public function scanRight1(callable $callback): CollectionInterface
{
return new self((new Operation\ScanRight1())()($callback), [$this]);

Check failure on line 720 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:720:56: InvalidArgument: Argument 1 expects callable(mixed, mixed, mixed, iterable<mixed, mixed>):mixed, but callable((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed), T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, Iterator<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed)) provided (see https://psalm.dev/004)

Check failure on line 720 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:720:56: InvalidArgument: Argument 1 expects callable(mixed, mixed, mixed, iterable<mixed, mixed>):mixed, but callable((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed), T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, Iterator<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed)) provided (see https://psalm.dev/004)

Check failure on line 720 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:720:56: InvalidArgument: Argument 1 expects callable(mixed, mixed, mixed, iterable<mixed, mixed>):mixed, but callable((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed), T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, Iterator<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed)) provided (see https://psalm.dev/004)

Check failure on line 720 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:720:56: InvalidArgument: Argument 1 expects callable(mixed, mixed, mixed, iterable<mixed, mixed>):mixed, but callable((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed), T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, Iterator<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed)) provided (see https://psalm.dev/004)

Check failure on line 720 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidArgument

src/Collection.php:720:56: InvalidArgument: Argument 1 expects callable(mixed, mixed, mixed, iterable<mixed, mixed>):mixed, but callable((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed), T:loophp\collection\Collection as mixed, TKey:loophp\collection\Collection as mixed, Iterator<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>):((T:loophp\collection\Collection as mixed)|(V:fn-loophp\collection\contract\operation\scanright1able::scanright1 as mixed)) provided (see https://psalm.dev/004)
}

public function shuffle(?int $seed = null): CollectionInterface
Expand All @@ -740,9 +740,9 @@
return new self((new Operation\Sort())()($type)($callback), [$this]);
}

public function span(callable ...$callbacks): CollectionInterface

Check failure on line 743 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:743:51: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)

Check failure on line 743 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:743:51: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)

Check failure on line 743 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:743:51: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)

Check failure on line 743 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:743:51: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)

Check failure on line 743 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:743:51: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span is incorrect, got 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' (see https://psalm.dev/011)
{
return (new self((new Operation\Span())()(...$callbacks), [$this]))

Check failure on line 745 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:745:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span (see https://psalm.dev/128)

Check failure on line 745 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:745:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span (see https://psalm.dev/128)

Check failure on line 745 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:745:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span (see https://psalm.dev/128)

Check failure on line 745 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:745:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span (see https://psalm.dev/128)

Check failure on line 745 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnStatement

src/Collection.php:745:16: InvalidReturnStatement: The inferred type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<int, iterable<mixed, mixed>>>&loophp\collection\Contract\Collection' does not match the declared return type 'loophp\collection\Contract\Collection<int, loophp\collection\Collection<TKey:loophp\collection\Collection as mixed, T:loophp\collection\Collection as mixed>>' for loophp\collection\Collection::span (see https://psalm.dev/128)
->map(
/**
* @param iterable<TKey, T> $iterable
Expand Down Expand Up @@ -805,7 +805,7 @@
return (new Operation\Truthy())()($this)->current();
}

public static function unfold(callable $callback, iterable $parameters = []): CollectionInterface

Check failure on line 808 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:808:83: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, iterable<array-key, T:fn-loophp\collection\contract\operation\unfoldable::unfold as mixed>>' for loophp\collection\Collection::unfold is incorrect, got 'loophp\collection\Collection<int, iterable<array-key, never>>' (see https://psalm.dev/011)

Check failure on line 808 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:808:83: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, iterable<array-key, T:fn-loophp\collection\contract\operation\unfoldable::unfold as mixed>>' for loophp\collection\Collection::unfold is incorrect, got 'loophp\collection\Collection<int, iterable<array-key, never>>' (see https://psalm.dev/011)

Check failure on line 808 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:808:83: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, iterable<array-key, T:fn-loophp\collection\contract\operation\unfoldable::unfold as mixed>>' for loophp\collection\Collection::unfold is incorrect, got 'loophp\collection\Collection<int, iterable<array-key, never>>' (see https://psalm.dev/011)

Check failure on line 808 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:808:83: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, iterable<array-key, T:fn-loophp\collection\contract\operation\unfoldable::unfold as mixed>>' for loophp\collection\Collection::unfold is incorrect, got 'loophp\collection\Collection<int, iterable<array-key, never>>' (see https://psalm.dev/011)

Check failure on line 808 in src/Collection.php

View workflow job for this annotation

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

InvalidReturnType

src/Collection.php:808:83: InvalidReturnType: The declared return type 'loophp\collection\Contract\Collection<int, iterable<array-key, T:fn-loophp\collection\contract\operation\unfoldable::unfold as mixed>>' for loophp\collection\Collection::unfold is incorrect, got 'loophp\collection\Collection<int, iterable<array-key, never>>' (see https://psalm.dev/011)
{
return new self((new Operation\Unfold())()($parameters)($callback));
}
Expand Down
35 changes: 0 additions & 35 deletions src/Operation/All.php

This file was deleted.

Loading