Skip to content

Commit

Permalink
fix: remove static constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Nov 27, 2022
1 parent d11addd commit 747e1f8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/Contract/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
* @template-extends Operation\Prependable<TKey, T>
* @template-extends Operation\Productable<TKey, T>
* @template-extends Operation\Randomable<TKey, T>
* @template-extends Operation\Rangeable<TKey, T>
* @template-extends Operation\Reduceable<TKey, T>
* @template-extends Operation\Reductionable<TKey, T>
* @template-extends Operation\Rejectable<TKey, T>
Expand All @@ -118,7 +117,6 @@
* @template-extends Operation\TakeWhileable<TKey, T>
* @template-extends Operation\Transposeable<TKey, T>
* @template-extends Operation\Truthyable<TKey, T>
* @template-extends Operation\Unfoldable<TKey, T>
* @template-extends Operation\Unlinesable<TKey, T>
* @template-extends Operation\Unpackable<mixed, array{0: TKey, 1: T}>
* @template-extends Operation\Unpairable<TKey, T>
Expand Down
4 changes: 0 additions & 4 deletions src/Contract/Operation/Rangeable.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

use const INF;

/**
* @template TKey
* @template T
*/
interface Rangeable
{
/**
Expand Down
4 changes: 2 additions & 2 deletions src/Contract/Operation/Timesable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ interface Timesable
*
* @template T
*
* @param null|callable(int): (int|T) $callback
* @param callable(int): T $callback
*
* @return Collection<int, int|T>
* @return Collection<int, T>
*/
public static function times(int $number = 0, ?callable $callback = null): Collection;
}
12 changes: 4 additions & 8 deletions src/Contract/Operation/Unfoldable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@

use loophp\collection\Contract\Collection;

/**
* @template TKey
* @template T
*/
interface Unfoldable
{
/**
* Create a collection by yielding from a callback with an initial value.
*
* @see https://loophp-collection.readthedocs.io/en/stable/pages/api.html#unfold
*
* @template U of T
* @template T
*
* @param callable(U ...): list<U> $callback
* @param array<int, U> $parameters
* @param callable(T ...): list<T> $callback
* @param array<int, T> $parameters
*
* @return Collection<int, list<U>>
* @return Collection<int, list<T>>
*/
public static function unfold(callable $callback, array $parameters = []): Collection;
}

0 comments on commit 747e1f8

Please sign in to comment.