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

Improve ext-ds stubs #675

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions stubs/ext-ds.stub
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface Collection extends Traversable, Countable, JsonSerializable
/**
* @return Collection<TKey, TValue>
*/
public function copy(): Collection;
public function copy();

/**
* @return array<TKey, TValue>
Expand Down Expand Up @@ -398,7 +398,7 @@ interface Sequence extends Collection
* @param (callable(TValue): bool)|null $callback
* @return Sequence<TValue>
*/
public function filter(callable $callback = null): Sequence;
public function filter(callable $callback = null);

/**
* @param TValue $value
Expand Down Expand Up @@ -442,14 +442,14 @@ interface Sequence extends Collection
* @param callable(TValue): TNewValue $callback
* @return Sequence<TNewValue>
*/
public function map(callable $callback): Sequence;
public function map(callable $callback);

/**
* @template TValue2
* @param iterable<TValue2> $values
* @return Sequence<TValue|TValue2>
*/
public function merge(iterable $values): Sequence;
public function merge(iterable $values);

/**
* @return TValue
Expand Down Expand Up @@ -480,7 +480,7 @@ interface Sequence extends Collection
/**
* @return Sequence<TValue>
*/
public function reversed(): Sequence;
public function reversed();

/**
* @param TValue $value
Expand All @@ -498,7 +498,7 @@ interface Sequence extends Collection
/**
* @return Sequence<TValue>
*/
public function slice(int $index, ?int $length = null): Sequence;
public function slice(int $index, ?int $length = null);

/**
* @param (callable(TValue, TValue): int)|null $comparator
Expand All @@ -510,7 +510,7 @@ interface Sequence extends Collection
* @param (callable(TValue, TValue): int)|null $comparator
* @return Sequence<TValue>
*/
public function sorted(callable $comparator = null): Sequence;
public function sorted(callable $comparator = null);

/**
* @param TValue ...$values
Expand Down