Skip to content

Commit

Permalink
refactor: Minor - add missing return types.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 3, 2021
1 parent 710c52f commit 837bd76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Operation/Falsy.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __invoke(): Closure

/** @psalm-var Closure(Iterator<TKey, T>): Generator<int, bool> $pipe */
$pipe = Pipe::of()(
MatchOne::of()(static fn () => true)($matchCallback),
MatchOne::of()(static fn (): bool => true)($matchCallback),
Map::of()($mapCallback),
);

Expand Down
4 changes: 2 additions & 2 deletions src/Operation/Nullsy.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function __invoke(): Closure

/** @psalm-var Closure(Iterator<TKey, T>): Generator<int, bool> $pipe */
$pipe = Pipe::of()(
MatchOne::of()(static fn () => false)($mapCallback),
Map::of()(static fn ($value) => !$value),
MatchOne::of()(static fn (): bool => false)($mapCallback),
Map::of()(static fn ($value): bool => !$value),
);

// Point free style.
Expand Down
2 changes: 1 addition & 1 deletion src/Operation/Truthy.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __invoke(): Closure

/** @psalm-var Closure(Iterator<TKey, T>): Generator<int, bool> $pipe */
$pipe = Pipe::of()(
MatchOne::of()(static fn () => true)($callback),
MatchOne::of()(static fn (): bool => true)($callback),
Map::of()($callback),
);

Expand Down

0 comments on commit 837bd76

Please sign in to comment.