diff --git a/src/Concerns/PrepareMiddlewares.php b/src/Concerns/PrepareMiddlewares.php index 5156f68..8c5bd57 100644 --- a/src/Concerns/PrepareMiddlewares.php +++ b/src/Concerns/PrepareMiddlewares.php @@ -18,6 +18,6 @@ private function wrapMiddleware(Middleware|string|callable $middleware, ?Message default => throw new \LogicException('Invalid middleware.') }; - return static fn (callable $handler) => static fn ($message) => $middleware($message, fn($message) => $handler($message, $consumer)); + return static fn (callable $handler) => static fn ($message) => $middleware($message, fn ($message) => $handler($message, $consumer)); } }