diff --git a/Spawn/Launcher.php b/Spawn/Launcher.php index 1e4827f..c441609 100644 --- a/Spawn/Launcher.php +++ b/Spawn/Launcher.php @@ -588,7 +588,7 @@ public function getSignaled(): ?int /** * @codeCoverageIgnore */ - public static function uvLoop(?\UVLoop $loop) + public static function uvLoop(\UVLoop $loop) { self::$uv = $loop; } diff --git a/Spawn/Spawn.php b/Spawn/Spawn.php index 78105dc..2d94313 100644 --- a/Spawn/Spawn.php +++ b/Spawn/Spawn.php @@ -151,9 +151,12 @@ public static function create( * * @codeCoverageIgnore */ - public static function setup(?\UVLoop $loop = null, bool $isYield = true, bool $bypass = true, bool $useUv = true): void + public static function setup($loop, bool $isYield = true, bool $bypass = true, bool $useUv = true): void { - Launcher::uvLoop($loop); + if ($loop instanceof \UVLoop) { + Launcher::uvLoop($loop); + } + self::$bypass = $bypass; self::$isYield = $isYield; self::$useUv = $useUv;