Skip to content

Commit

Permalink
fix: the tap helper should not enforce any return type for the callback
Browse files Browse the repository at this point in the history
  • Loading branch information
tpetry authored and szepeviktor committed Nov 15, 2021
1 parent 53ef50c commit 19098c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed
* No return type should be enforced for closure of tap helper

### Changed
* Improved return type for Collection::first, last, get, pull when giving a default value.

Expand Down
2 changes: 1 addition & 1 deletion stubs/Helpers.stub
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function retry($times, callable $callback, $sleep = 0, $when = null)
/**
* @template TValue
* @param TValue $value
* @param null|callable(TValue): void $callback
* @param null|callable(TValue): mixed $callback
* @return mixed
*/
function tap($value, $callback = null)
Expand Down

0 comments on commit 19098c7

Please sign in to comment.