Test Failed
Pull Request — master (#24)
by Filippo
12:43
created
src/ChunksManager.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
     public function temporaryFiles(string $folder): Collection
134 134
     {
135 135
         $chunks = $this->chunks($folder);
136
-        if (! $this->chunksFilesystem->isLocal()) {
136
+        if (!$this->chunksFilesystem->isLocal()) {
137 137
             return $this->chunksFilesystem->createTemporaryFiles($folder, $chunks);
138 138
         }
139 139
 
140
-        return $chunks->map(function (Chunk $chunk) {
140
+        return $chunks->map(function(Chunk $chunk) {
141 141
             return $chunk->getPath();
142 142
         });
143 143
     }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     public function addChunk(UploadedFile $file, int $index, string $folder): Chunk
170 170
     {
171 171
         // Check integrity
172
-        if (! $this->checkChunkIntegrity($folder, $index)) {
172
+        if (!$this->checkChunkIntegrity($folder, $index)) {
173 173
             throw new ChunksIntegrityException("Uploaded chunk with index {$index} violates the integrity");
174 174
         }
175 175
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $progress_bar = $this->hasProgressBar($output, count($folders));
204 204
 
205 205
         foreach ($folders as $folder) {
206
-            if (! $this->deleteChunkFolder($folder)) {
206
+            if (!$this->deleteChunkFolder($folder)) {
207 207
                 return false;
208 208
             }
209 209
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      */
250 250
     public function handleMerge(string $folder, string $destination, int $chunk_size, int $total_size)
251 251
     {
252
-        if (! $this->checkFilesIntegrity($folder, $chunk_size, $total_size)) {
252
+        if (!$this->checkFilesIntegrity($folder, $chunk_size, $total_size)) {
253 253
             throw new ChunksIntegrityException('Chunks total file size doesnt match with original file size');
254 254
         }
255 255
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         $path = $this->chunksFilesystem()->fullPath($folder);
277 277
         $default = $this->settings->defaultIndex();
278 278
 
279
-        if (! $this->chunksFilesystem()->exists($path) && $index != $default) {
279
+        if (!$this->chunksFilesystem()->exists($path) && $index != $default) {
280 280
             return false;
281 281
         } elseif ($this->chunksFilesystem()->exists($path)) {
282 282
             if (ChunkySettings::INDEX_ZERO != $default) {
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
             return $this->chunksFilesystem()->chunksCount($path) == $index;
287 287
         } elseif ($index == $default) {
288
-            if (! $this->chunksFilesystem()->makeDirectory($path)) {
288
+            if (!$this->chunksFilesystem()->makeDirectory($path)) {
289 289
                 throw new ChunksIntegrityException("Cannot create chunks folder $path");
290 290
             }
291 291
         }
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
         foreach ($chunks as $chunk) {
305 305
             $size = $this->chunksFilesystem->chunkSize($chunk->getPath());
306 306
 
307
-            if ($size < $chunk_size && ! $chunk->isLast()) {
307
+            if ($size < $chunk_size && !$chunk->isLast()) {
308 308
                 return false;
309 309
             }
310 310
 
Please login to merge, or discard this patch.
src/Commands/ClearChunks.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,17 +50,17 @@  discard block
 block discarded – undo
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->chunksFilesystem()->delete($root)) {
63
+            if (!$this->manager->chunksFilesystem()->delete($root)) {
64 64
                 $this->error("An error occurred while deleting folder {$root}");
65 65
 
66 66
                 return;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
             $this->info("folder {$root} cleared!");
70 70
         } else {
71
-            if (! $this->manager->deleteAllChunks($this->output)) {
71
+            if (!$this->manager->deleteAllChunks($this->output)) {
72 72
                 $this->error("An error occurred while deleting folder {$folder}");
73 73
 
74 74
                 return;
Please login to merge, or discard this patch.