Skip to content

Commit 647cc02

Browse files
committed
ensure FunctionProxy instances are always recognized as callable
1 parent a7d20e7 commit 647cc02

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 8.0.2 (2023-22-26)
4+
5+
* Added proper return type hints to `bovigo\callmap\FunctionProxy::returns()` and `bovigo\callmap\FunctionProxy::throws()` so the instance is further recognized as a callable.
6+
37
## 8.0.1 (2023-12-25)
48

59
* Provide more details about mocked method/function in deprecation notice when method or function doesn't have a return type declaration.

src/main/php/FunctionProxy.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function preventParentCalls(): void
7474
* sets the call map to use
7575
*
7676
* @api
77+
* @return callable&FunctionProxy
7778
* @throws LogicException when mapped function is declared as returning void
7879
* @since 3.2.0
7980
*/
@@ -96,6 +97,7 @@ public function returns(mixed $returnValue): self
9697
* shortcut for returns(throws($e))
9798
*
9899
* @api
100+
* @return callable&FunctionProxy
99101
* @since 3.2.0
100102
*/
101103
public function throws(Throwable $e): self

0 commit comments

Comments
 (0)