Skip to content

Commit

Permalink
Fix for PhpStan
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored and freekmurze committed Aug 10, 2023
1 parent 44b0329 commit d3c7d35
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 0 additions & 4 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
parameters:
ignoreErrors:
-
message: "#^Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\), Spatie\\\\Backup\\\\BackupDestination\\\\BackupCollection\\> does not accept Illuminate\\\\Support\\\\Collection\\.$#"
count: 4
path: src/Tasks/Cleanup/Strategies/DefaultStrategy.php
1 change: 1 addition & 0 deletions src/Tasks/Cleanup/Strategies/DefaultStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function deleteOldBackups(BackupCollection $backups)

$dateRanges = $this->calculateDateRanges();

/** @var Collection<(string|BackupCollection)> */
$backupsPerPeriod = $dateRanges->map(function (Period $period) use ($backups) {
return $backups
->filter(fn (Backup $backup) => $backup->date()->between($period->startDate(), $period->endDate()));
Expand Down

0 comments on commit d3c7d35

Please sign in to comment.