Skip to content

Commit 20bd6ca

Browse files
committed
Make argument optional for resolve()/reject helper methods
1 parent fb35482 commit 20bd6ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/React/Promise/When.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
class When
66
{
7-
public static function resolve($promiseOrValue)
7+
public static function resolve($promiseOrValue = null)
88
{
99
return Util::promiseFor($promiseOrValue);
1010
}
1111

12-
public static function reject($promiseOrValue)
12+
public static function reject($promiseOrValue = null)
1313
{
1414
return static::resolve($promiseOrValue)->then(function ($value = null) {
1515
return new RejectedPromise($value);

0 commit comments

Comments
 (0)