Skip to content

Commit 4a1712b

Browse files
Pederytterrasmuscnielsen
authored andcommitted
Apply fixes from StyleCI (#3)
1 parent 744aeea commit 4a1712b

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/HealthySqlDump.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function checkHealth(BackupDestination $backupDestination)
2323
{
2424
$this->failsOnEmpty($newestBackup = $backupDestination->backups()->newest());
2525

26-
if (Cache::has($key = static::class . '--' . $newestBackup->path() . '--result')) {
26+
if (Cache::has($key = static::class.'--'.$newestBackup->path().'--result')) {
2727
throw_if(Cache::get($key) === false, DatabaseImportFailed::previouslyFailed());
2828

2929
return;
@@ -65,7 +65,7 @@ public function performCheck(BackupDestination $backupDestination, Backup $backu
6565
protected function setupTempDirectory(BackupDestination $destination, Backup $backup)
6666
{
6767
return (new TemporaryDirectory(config('backup.backup.temporary_directory')))
68-
->name('healthy-sql-dump--' . $destination->diskName() . '--' . pathinfo($backup->path(), PATHINFO_FILENAME))
68+
->name('healthy-sql-dump--'.$destination->diskName().'--'.pathinfo($backup->path(), PATHINFO_FILENAME))
6969
->force()
7070
->create()
7171
->empty();
@@ -82,7 +82,7 @@ protected function downloadAndExtract(Backup $backup, TemporaryDirectory $tempor
8282
$destination = $temporaryDirectory->path(pathinfo($backup->path(), PATHINFO_BASENAME));
8383
$stream = fopen($destination, 'w+b');
8484

85-
if (stream_copy_to_stream($backup->stream(), $stream) === false || !fclose($stream)) {
85+
if (stream_copy_to_stream($backup->stream(), $stream) === false || ! fclose($stream)) {
8686
$this->fail('Something went wrong while downloading backup to temporary storage!');
8787
}
8888

@@ -100,7 +100,7 @@ protected function extract($source)
100100
$zip->extractTo($destination = str_before($source, '.zip'));
101101
$zip->close();
102102

103-
$this->failIf(!is_dir($destination), 'Something went wrong while extracting zip file!');
103+
$this->failIf(! is_dir($destination), 'Something went wrong while extracting zip file!');
104104

105105
return $destination;
106106
}
@@ -144,7 +144,7 @@ protected function getDumps($backupFolder)
144144
{
145145
return (new Finder)
146146
->files()
147-
->in($backupFolder . DIRECTORY_SEPARATOR . 'db-dumps')
147+
->in($backupFolder.DIRECTORY_SEPARATOR.'db-dumps')
148148
->name('mysql-*');
149149
}
150150
}

tests/Feature/HealthySqlDumpTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function it_fails_when_backup_is_corrupt()
3939
Event::assertDispatched(HealthyBackupWasFound::class);
4040
}
4141

42-
4342
// Needs better backup option
4443
// /** @test */
4544
// public function it_fails_when_backup_is_corrupt()

0 commit comments

Comments
 (0)