From 49624690cfc5c73404e179acfef1e37fc5c7cca6 Mon Sep 17 00:00:00 2001 From: axunonb Date: Sun, 29 Sep 2024 21:44:28 +0200 Subject: [PATCH] SonarCloud recommendations --- League/Caching/ReportSheetCache.cs | 2 +- .../HtmlToPdfConverter/HtmlToPdfConverter.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/League/Caching/ReportSheetCache.cs b/League/Caching/ReportSheetCache.cs index fa62b9c..754ead4 100644 --- a/League/Caching/ReportSheetCache.cs +++ b/League/Caching/ReportSheetCache.cs @@ -108,7 +108,7 @@ public async Task GetOrCreatePdf(MatchReportSheetRow data, string html, return stream; } - private bool IsOutdated(string cacheFile, DateTime dataModifiedOn) + private static bool IsOutdated(string cacheFile, DateTime dataModifiedOn) { var fi = new FileInfo(cacheFile); diff --git a/TournamentManager/TournamentManager/HtmlToPdfConverter/HtmlToPdfConverter.cs b/TournamentManager/TournamentManager/HtmlToPdfConverter/HtmlToPdfConverter.cs index 7a0ac9e..488ae70 100644 --- a/TournamentManager/TournamentManager/HtmlToPdfConverter/HtmlToPdfConverter.cs +++ b/TournamentManager/TournamentManager/HtmlToPdfConverter/HtmlToPdfConverter.cs @@ -81,7 +81,7 @@ private void EnsureTempFolder(string tempFolder) public async Task GeneratePdfData(FileInfo htmlFile, CancellationToken cancellationToken) { var pdfData = UsePuppeteer - ? await GetPdfDataPuppeteer(htmlFile, cancellationToken) + ? await GetPdfDataPuppeteer(htmlFile) : await GetPdfDataBrowser(htmlFile, cancellationToken); return pdfData; @@ -112,7 +112,7 @@ private void EnsureTempFolder(string tempFolder) } } - private async Task GetPdfDataPuppeteer(FileInfo fileInfo, CancellationToken cancellationToken) + private async Task GetPdfDataPuppeteer(FileInfo fileInfo) { return await GetPdfDataPuppeteer(fileInfo.FullName, true); }