Skip to content

Commit 3ea6e23

Browse files
committed
Require a callback to when()
1 parent 3d3fb68 commit 3ea6e23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Whenable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
interface Whenable
99
{
1010
/**
11-
* Calling this method without a callback will throw the exception from a failed whenable in an uncatchable way.
11+
* Registers a callback to be invoked when the whenable is resolved.
1212
*
13-
* @param callable(\Throwable|\Exception $exception = null, mixed $result = null)|null $onResolved
13+
* @param callable(\Throwable|\Exception $exception = null, mixed $result = null) $onResolved
1414
*/
15-
public function when(callable $onResolved = null);
15+
public function when(callable $onResolved);
1616
}

0 commit comments

Comments
 (0)