diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 758f99e..ff0c46b 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -36,7 +36,7 @@ public function register() 'debug' => $debug, ]); - $this->app->singleton(ResponseFactory::class, function () use ($config) { + $this->app->singleton(ResponseFactory::class, function () use ($config): ResponseFactory { return new ResponseFactory((new Factory())->getSerializer($config), $config); }); }