@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $this->request->fileInput()->getMimeType() |
| 63 | 63 | ); |
| 64 | 64 | |
| 65 | - if (! $handler->checkIntegrity($this->request->chunkSizeInput(), $this->request->totalSizeInput())) { |
|
| 65 | + if (!$handler->checkIntegrity($this->request->chunkSizeInput(), $this->request->totalSizeInput())) { |
|
| 66 | 66 | throw new ChunksIntegrityException('Chunks total file size doesnt match with original file size'); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | if ($folder === null) { |
| 61 | 61 | return ''; |
| 62 | - } elseif (! Str::endsWith($folder, '/')) { |
|
| 62 | + } elseif (!Str::endsWith($folder, '/')) { |
|
| 63 | 63 | $folder .= DIRECTORY_SEPARATOR; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | if ($folder === null) { |
| 89 | 89 | return ''; |
| 90 | - } elseif (! Str::endsWith($folder, '/')) { |
|
| 90 | + } elseif (!Str::endsWith($folder, '/')) { |
|
| 91 | 91 | $folder .= DIRECTORY_SEPARATOR; |
| 92 | 92 | } |
| 93 | 93 | |
@@ -50,17 +50,17 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $this->manager = $manager; |
| 52 | 52 | |
| 53 | - if (! $this->confirmToProceed()) { |
|
| 53 | + if (!$this->confirmToProceed()) { |
|
| 54 | 54 | return; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $root = $this->manager->getChunksFolder(); |
| 58 | 58 | $folder = $this->argument('folder'); |
| 59 | 59 | |
| 60 | - if (! empty($folder)) { |
|
| 60 | + if (!empty($folder)) { |
|
| 61 | 61 | $root .= $folder; |
| 62 | 62 | |
| 63 | - if (! $this->manager->deleteChunks($root)) { |
|
| 63 | + if (!$this->manager->deleteChunks($root)) { |
|
| 64 | 64 | $this->error("An error occurred while deleting folder {$root}"); |
| 65 | 65 | |
| 66 | 66 | return; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | $this->info("folder {$root} cleared!"); |
| 70 | 70 | } else { |
| 71 | - if (! $this->manager->deleteAllChunks()) { |
|
| 71 | + if (!$this->manager->deleteAllChunks()) { |
|
| 72 | 72 | $this->error("An error occurred while deleting folder {$folder}"); |
| 73 | 73 | |
| 74 | 74 | return; |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | public function chunksFolderExists($folder = ''): bool |
| 19 | 19 | { |
| 20 | - if (! Str::startsWith($folder, $this->getChunksFolder())) { |
|
| 20 | + if (!Str::startsWith($folder, $this->getChunksFolder())) { |
|
| 21 | 21 | $folder = $this->getChunksFolder().$folder; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -37,18 +37,18 @@ discard block |
||
| 37 | 37 | $this->getChunksFolder() |
| 38 | 38 | ); |
| 39 | 39 | |
| 40 | - if (app()->runningInConsole() && ! app()->runningUnitTests()) { |
|
| 40 | + if (app()->runningInConsole() && !app()->runningUnitTests()) { |
|
| 41 | 41 | $this->progress_bar = $this->output->createProgressBar( |
| 42 | 42 | count($folders) |
| 43 | 43 | ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | foreach ($folders as $folder) { |
| 47 | - if (! $this->deleteChunks($folder)) { |
|
| 47 | + if (!$this->deleteChunks($folder)) { |
|
| 48 | 48 | return false; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - if (app()->runningInConsole() && ! app()->runningUnitTests()) { |
|
| 51 | + if (app()->runningInConsole() && !app()->runningUnitTests()) { |
|
| 52 | 52 | $this->progress_bar->advance(); |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function deleteChunks(string $folder): bool |
| 67 | 67 | { |
| 68 | - if (! $this->chunksFolderExists($folder)) { |
|
| 68 | + if (!$this->chunksFolderExists($folder)) { |
|
| 69 | 69 | return false; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $deleted = $this->chunksFilesystem() |
| 77 | 77 | ->delete($file); |
| 78 | 78 | |
| 79 | - if (! $deleted) { |
|
| 79 | + if (!$deleted) { |
|
| 80 | 80 | return false; |
| 81 | 81 | } |
| 82 | 82 | } |