1
0
mirror of https://github.com/danog/amp.git synced 2024-11-30 04:29:08 +01:00

Null default for Success

This commit is contained in:
Aaron Piotrowski 2016-05-29 10:40:00 -05:00
parent 3edab2dfd3
commit da3bbdf90c

View File

@ -16,7 +16,7 @@ class Success implements Awaitable {
*
* @throws \InvalidArgumentException If an awaitable is given as the value.
*/
public function __construct($value)
public function __construct($value = null)
{
if ($value instanceof Awaitable) {
throw new \InvalidArgumentException("Cannot use an awaitable as success value");