From 0d85a72d6fe58f2235e9d78aba62881a1c0a21cc Mon Sep 17 00:00:00 2001 From: lewislarsen Date: Mon, 1 Jul 2024 18:42:53 +0000 Subject: [PATCH 1/2] Dusting --- app/Services/Backup/Backup.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/app/Services/Backup/Backup.php b/app/Services/Backup/Backup.php index 7074eced..eeaf7494 100644 --- a/app/Services/Backup/Backup.php +++ b/app/Services/Backup/Backup.php @@ -24,7 +24,6 @@ use Exception; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Mail; -use InvalidArgumentException; use phpseclib3\Crypt\Common\PrivateKey; use phpseclib3\Crypt\PublicKeyLoader; use RuntimeException; @@ -544,14 +543,6 @@ protected function logWithTimestamp(string $message, string $timezone): string return '[' . $timestamp . '] ' . $message . "\n"; } - /** - * @param BackupDestinationInterface $backupDestination - * @param int $backupTaskId - * @param int $backupLimit - * @param string $fileExtension - * @param string $pattern - * @return void - */ protected function rotateOldBackups( BackupDestinationInterface $backupDestination, int $backupTaskId, @@ -570,15 +561,17 @@ protected function rotateOldBackups( while (count($files) > $backupLimit) { $oldestFile = array_pop($files); - if (!is_array($oldestFile)) { + if (! is_array($oldestFile)) { $this->logError('Invalid file structure encountered.', ['file' => $oldestFile]); + continue; } $file = $oldestFile['Key'] ?? $oldestFile['name'] ?? null; - if (!is_string($file)) { + if (! is_string($file)) { $this->logError('Invalid file name or key.', ['file' => $oldestFile]); + continue; } From cd75c598e5fb2793cb499da07c778196cf1b940a Mon Sep 17 00:00:00 2001 From: lewislarsen Date: Mon, 1 Jul 2024 18:42:54 +0000 Subject: [PATCH 2/2] Ignore Dusting commit in git blame --- .git-blame-ignore-revs | 1 + 1 file changed, 1 insertion(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 83dd5c05..388ef37a 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -16,3 +16,4 @@ e9a4dfa07fa462e92828a0a1cdfa72d20f4fa7b9 3afb045fbc17e8938d82753bee0fb9c3c0bddcac c26f5c08fa85972b95297b748c394971c3bc893e 71c87c056fa275d369a25be7f2d42b0416f60fc9 +0d85a72d6fe58f2235e9d78aba62881a1c0a21cc