diff --git a/src/Illuminate/Contracts/Routing/ResponseFactory.php b/src/Illuminate/Contracts/Routing/ResponseFactory.php index 8df598e8e771..c724fbb8a3dd 100644 --- a/src/Illuminate/Contracts/Routing/ResponseFactory.php +++ b/src/Illuminate/Contracts/Routing/ResponseFactory.php @@ -2,6 +2,9 @@ namespace Illuminate\Contracts\Routing; +use Closure; +use Illuminate\Http\StreamedEvent; + interface ResponseFactory { /** @@ -65,7 +68,7 @@ public function jsonp($callback, $data = [], $status = 200, array $headers = [], * @param \Illuminate\Http\StreamedEvent|string|null $endStreamWith * @return \Symfony\Component\HttpFoundation\StreamedResponse */ - public function eventStream($callback, array $headers = [], $endStreamWith = ''); + public function eventStream(Closure $callback, array $headers = [], StreamedEvent|string|null $endStreamWith = ''); /** * Create a new streamed response instance.