type) { OauthClient::TYPE_APPLICATION => new ApplicationType([ 'name' => $client->name, 'websiteUrl' => $client->website_url, 'description' => $client->description, 'redirectUri' => $client->redirect_uri, ]), OauthClient::TYPE_MINECRAFT_SERVER => new MinecraftServerType([ 'name' => $client->name, 'websiteUrl' => $client->website_url, 'minecraftServerIp' => $client->minecraft_server_ip, ]), default => throw new UnsupportedOauthClientType($client->type), }; } }