From 73f3a5f5b6d10203d89f88a14a22df9df26f7d22 Mon Sep 17 00:00:00 2001 From: Ramin Farmani Date: Mon, 3 Jan 2022 01:20:43 +0330 Subject: [PATCH] Resolve issue with php strict type (#1110) * Resolve issue with php strict type related to the issue https://github.com/laravel/horizon/issues/1109 * Update RedisMetricsRepository.php Co-authored-by: Taylor Otwell --- src/Repositories/RedisMetricsRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Repositories/RedisMetricsRepository.php b/src/Repositories/RedisMetricsRepository.php index 3c3e9697..c3abe54d 100644 --- a/src/Repositories/RedisMetricsRepository.php +++ b/src/Repositories/RedisMetricsRepository.php @@ -331,8 +331,8 @@ protected function baseSnapshotData($key) */ protected function minutesSinceLastSnapshot() { - $lastSnapshotAt = $this->connection()->get('last_snapshot_at') - ?: $this->storeSnapshotTimestamp(); + $lastSnapshotAt = (int) ($this->connection()->get('last_snapshot_at') + ?: $this->storeSnapshotTimestamp()); return max( (CarbonImmutable::now()->getTimestamp() - $lastSnapshotAt) / 60, 1