Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a19eab

Browse files
committed
Restore factory nullability
1 parent ce6f2a8 commit 0a19eab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Loop.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ final class Loop
3838
* The factory will be invoked if none is passed to `Loop::execute`. A default driver will be created to
3939
* support synchronous waits in traditional applications.
4040
*
41-
* @param DriverFactory $factory New factory to replace the previous one.
41+
* @param DriverFactory|null $factory New factory to replace the previous one.
4242
*/
43-
public static function setFactory(DriverFactory $factory)
43+
public static function setFactory(DriverFactory $factory = null)
4444
{
4545
if (self::$level > 0) {
4646
throw new \RuntimeException("Setting a new factory while running isn't allowed!");

0 commit comments

Comments
 (0)