Cleanup, configuration

This commit is contained in:
2024-03-11 00:50:15 +01:00
parent 88bf239eb1
commit 6184e300bc
4 changed files with 38 additions and 32 deletions

View File

@ -42,7 +42,7 @@ class Server
*
*
*/
public function __construct(Configuration $config, array $options=[], ?LoopInterface $loop=null)
public function __construct(Configuration $config, ?LoopInterface $loop=null)
{
$this->loop = $loop??Loop::get();
@ -53,7 +53,7 @@ class Server
$this->eventClients = new SplObjectStorage();
$this->webSocketClients = new SplObjectStorage();
$this->server = $this->createHttpServer($options);
$this->server = $this->createHttpServer();
}
/**
@ -70,7 +70,7 @@ class Server
*
* @return HttpServer
*/
private function createHttpServer(array $options): HttpServer
private function createHttpServer(): HttpServer
{
return new HttpServer(
$this->responseMiddleware = new ResponseMiddleware(
@ -85,8 +85,7 @@ class Server
topicManager: $this->topicManager
),
$this->mercureHandler = new MercureHandler(
config: $this->config,
eventClients: $this->eventClients,
config: $this->config,
topicManager: $this->topicManager
),
$this->apiRequestHandler = new ApiHandler(