From ae9ad56554e8e6afab62627f9f2bfe98776c3d87 Mon Sep 17 00:00:00 2001 From: Camill Hauser Date: Wed, 7 Feb 2024 12:30:56 +0100 Subject: [PATCH] rector fixes --- Classes/Service/ConfigService.php | 8 ++++++++ Classes/Utility/TimingUtility.php | 1 + 2 files changed, 9 insertions(+) diff --git a/Classes/Service/ConfigService.php b/Classes/Service/ConfigService.php index 0c18c39..b1e8f9f 100644 --- a/Classes/Service/ConfigService.php +++ b/Classes/Service/ConfigService.php @@ -10,7 +10,15 @@ final class ConfigService { /** @var int */ private const DEFAULT_STOP_WATCH_LIMIT = 100_000; + + /** + * @var int + */ private const DEFAULT_DESCRIPTION_LENGTH = 100; + + /** + * @var int + */ private const DEFAULT_NUMBER_TIMINGS = 70; public function stopWatchLimit(): int diff --git a/Classes/Utility/TimingUtility.php b/Classes/Utility/TimingUtility.php index 3e0ebd2..a78dc79 100644 --- a/Classes/Utility/TimingUtility.php +++ b/Classes/Utility/TimingUtility.php @@ -142,6 +142,7 @@ public function shutdown(ScriptResult $result): ?ResponseInterface $duration = $time->getDuration(); $timings[$duration . $index] = $this->timingString($index, trim($time->key . ' ' . $time->info . ' ' . $duration), $duration); } + krsort($timings); $timings = array_slice($timings, 0, $this->configService->getMaxNumberOfTimings());