Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Jul 22, 2024
1 parent dfd3e6e commit 2eef9f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Checks/Checks/BackupsCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ public function run(): Result
if ($this->youngestShouldHaveBeenMadeBefore) {
if ($this->youngestBackupIsToolOld($eligableBackups)) {
return Result::make()
->failed('Youngest backup was too old');
->failed('Youngest backup was too old');
}
}

if ($this->oldestShouldHaveBeenMadeAfter) {
if ($this->oldestBackupIsTooYoung($eligableBackups)) {
return Result::make()
->failed('Oldest backup was too young');
->failed('Oldest backup was too young');
}
}

Expand Down
7 changes: 4 additions & 3 deletions src/Support/BackupFile.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<?php

namespace Spatie\Health\Support;

use Illuminate\Contracts\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\File\File as SymfonyFile;

class BackupFile {
class BackupFile
{
protected ?SymfonyFile $file = null;

public function __construct(
protected string $path,
protected ?Filesystem $disk = null,
) {
if (!$disk) {
if (! $disk) {
$this->file = new SymfonyFile($path);
}
}
Expand All @@ -30,5 +32,4 @@ public function lastModified(): int
{
return $this->file ? $this->file->getMTime() : $this->disk->lastModified($this->path);
}

}
2 changes: 1 addition & 1 deletion tests/Checks/BackupsCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@

shell_exec("truncate -s {$sizeInMb}M {$tempFile}");

Storage::disk('backups')->put('backups/hey.zip',file_get_contents($tempFile) );
Storage::disk('backups')->put('backups/hey.zip', file_get_contents($tempFile));

$result = $this->backupsCheck
->onDisk('backups')
Expand Down

0 comments on commit 2eef9f9

Please sign in to comment.