File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,14 @@ interface Promise
10
10
/**
11
11
* Registers a callback to be invoked when the promise is resolved.
12
12
*
13
- * @param callable(\Throwable|\Exception|null $exception, mixed $result) $onResolved
13
+ * The callback receives `null` as first parameter and `$value` as second parameter on success. It receives the
14
+ * failure reason as first parameter and `null` as second parameter on failure.
15
+ *
16
+ * If the promise is already resolved, the callback MUST be executed immediately.
17
+ *
18
+ * Warning: If you use type declarations for `$value`, be sure to make them accept `null` in case of failures.
19
+ *
20
+ * @param callable(\Throwable|\Exception|null $exception, mixed $value) $onResolved Callback to be executed.
14
21
*
15
22
* @return void
16
23
*/
You can’t perform that action at this time.
0 commit comments