@@ -60,7 +60,7 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | public function register() : void |
| 62 | 62 | { |
| 63 | - $this->app->singleton('Olssonm\BackupShield\Encryption', function ($app) { |
|
| 63 | + $this->app->singleton('Olssonm\BackupShield\Encryption', function($app) { |
|
| 64 | 64 | return new \Olssonm\BackupShield\Encryption; |
| 65 | 65 | }); |
| 66 | 66 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | $zipArchive->open($path, ZipArchive::OVERWRITE); |
| 70 | 70 | $zipArchive->addFile($path, 'backup.zip'); |
| 71 | 71 | $zipArchive->setPassword($this->password); |
| 72 | - Collection::times($zipArchive->numFiles, function ($i) use ($zipArchive, $encryptionConstant) { |
|
| 72 | + Collection::times($zipArchive->numFiles, function($i) use ($zipArchive, $encryptionConstant) { |
|
| 73 | 73 | $zipArchive->setEncryptionIndex($i - 1, $encryptionConstant); |
| 74 | 74 | }); |
| 75 | 75 | $zipArchive->close(); |
@@ -70,10 +70,10 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | public function getEncryptionConstant($type, $engine) |
| 72 | 72 | { |
| 73 | - if ($engine == 'ZipArchive' && isset($this->zipArchiveOptions[$type])) { |
|
| 74 | - return $this->zipArchiveOptions[$type]; |
|
| 75 | - } elseif ($engine == 'ZipFile' && isset($this->zipFileOptions[$type])) { |
|
| 76 | - return $this->zipFileOptions[$type]; |
|
| 73 | + if ($engine == 'ZipArchive' && isset($this->zipArchiveOptions[ $type ])) { |
|
| 74 | + return $this->zipArchiveOptions[ $type ]; |
|
| 75 | + } elseif ($engine == 'ZipFile' && isset($this->zipFileOptions[ $type ])) { |
|
| 76 | + return $this->zipFileOptions[ $type ]; |
|
| 77 | 77 | } else { |
| 78 | 78 | throw new \Exception("Encryption key not set or invalid value", 1); |
| 79 | 79 | } |