Skip to content

Commit

Permalink
refactor: remove obsolete All class (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Feb 20, 2024
1 parent acb6d8f commit a7e549f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 50 deletions.
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 @@ private function __construct(callable $callable, iterable $parameters = [])

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
35 changes: 0 additions & 35 deletions src/Operation/All.php

This file was deleted.

0 comments on commit a7e549f

Please sign in to comment.