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
2 changed files with 165 additions and 168 deletions

View file

@ -19,6 +19,6 @@ final class UserIdCompletionProvider implements ProviderInterface
public function getCompletions(string $currentValue): array
{
return array_filter(self::AVAILABLE_USER_IDS, fn (string $userId) => str_contains($userId, $currentValue));
return array_filter(self::AVAILABLE_USER_IDS, static fn (string $userId) => str_contains($userId, $currentValue));
}
}

View file

@ -23,7 +23,7 @@ $server = Server::builder()
->setSession(new FileSessionStore(__DIR__.'/sessions'))
->setDiscovery(__DIR__)
->addTool(
function (float $a, float $b, string $operation = 'add'): array {
static function (float $a, float $b, string $operation = 'add'): array {
$result = match ($operation) {
'add' => $a + $b,
'subtract' => $a - $b,
@ -42,7 +42,7 @@ $server = Server::builder()
description: 'Perform basic math operations (add, subtract, multiply, divide)'
)
->addResource(
function (): array {
static function (): array {
$memoryUsage = memory_get_usage(true);
$memoryPeak = memory_get_peak_usage(true);
$uptime = time() - ($_SERVER['REQUEST_TIME_FLOAT'] ?? time());