Update codestyle based on updated Symfony rules (#229)

This commit is contained in:
Christopher Hertel 2026-02-01 11:54:31 +01:00 • committed by GitHub
commit c081b90d74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -173,7 +173,7 @@ class Protocol
try {
/** @var McpFiber $fiber */
$fiber = new \Fiber(fn () => $handler->handle($request, $session));
$fiber = new \Fiber(static fn () => $handler->handle($request, $session));
$result = $fiber->start();
@ -192,11 +192,10 @@ class Protocol
$transport->attachFiberToSession($fiber, $session->getId());
return;
} else {
$finalResult = $fiber->getReturn();
$this->sendResponse($transport, $finalResult, $session);
}
$finalResult = $fiber->getReturn();
$this->sendResponse($transport, $finalResult, $session);
} catch (\InvalidArgumentException $e) {
$this->logger->warning(\sprintf('Invalid argument: %s', $e->getMessage()), ['exception' => $e]);
@ -581,7 +580,7 @@ class Protocol
if (!empty($deletedSessions)) {
$this->logger->debug('Garbage collected expired sessions.', [
'count' => \count($deletedSessions),
'session_ids' => array_map(fn (Uuid $id) => $id->toRfc4122(), $deletedSessions),
'session_ids' => array_map(static fn (Uuid $id) => $id->toRfc4122(), $deletedSessions),
]);
}
}