Skip to content

Commit

Permalink
Resolve issue with php strict type (#1110)
Browse files Browse the repository at this point in the history
* Resolve issue with php strict type

related to the issue #1109

* Update RedisMetricsRepository.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
farmani and taylorotwell committed Jan 2, 2022
1 parent 251a5cc commit 73f3a5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Repositories/RedisMetricsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73f3a5f

Please sign in to comment.