Skip to content

Commit

Permalink
docs: Update annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Oct 2, 2020
1 parent 9d2579c commit 0e111ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Contract/Operation/Everyable.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @psalm-template TKey
* @psalm-template TKey of array-key
* @psalm-template T of bool
* @psalm-template T
*/
interface Everyable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Unpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
final class Unpack extends AbstractOperation
{
/**
* @psalm-return Closure(Iterator<TKey, T>): Generator<T, T, mixed, void>
* @psalm-return Closure(Iterator<int, array{0: TKey, 1: T}>): Generator<T, T>
*/
public function __invoke(): Closure
{
Expand Down
4 changes: 2 additions & 2 deletions src/Operation/Words.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
final class Words extends AbstractOperation
{
/**
* @psalm-return Closure(Iterator<TKey, T>): Generator<TKey, string, mixed, void>
* @psalm-return Closure(Iterator<TKey, T>): Generator<TKey, string>
*/
public function __invoke(): Closure
{
$mapCallback = static function (array $value): string {
return implode('', $value);
};

/** @psalm-var Closure(Iterator<TKey, string>): Generator<TKey, string> $compose */
/** @psalm-var Closure(Iterator<TKey, T>): Generator<TKey, string> $compose */
$compose = Compose::of()(
Explode::of()("\t", "\n", ' '),
Map::of()($mapCallback),
Expand Down

0 comments on commit 0e111ab

Please sign in to comment.