Test Failed
Push — master ( 2cefea...d08b1d )
by Filippo
06:04 queued 01:17
created
src/Http/Requests/AddChunkRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 
108 108
         foreach (config('chunky.validation') as $input => $config) {
109 109
             if (
110
-                ! in_array($input, ['index', 'file', 'chunkSize', 'totalSize'])
110
+                !in_array($input, ['index', 'file', 'chunkSize', 'totalSize'])
111 111
                 && Arr::has($config, 'key')
112 112
                 && Arr::has($config, 'rules')
113 113
             ) {
Please login to merge, or discard this patch.
src/ChunkySettings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Strategies/MergeStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function destination($destination = null): string
67 67
     {
68
-        if (is_string($destination) && ! empty($destination)) {
68
+        if (is_string($destination) && !empty($destination)) {
69 69
             $this->destination = $this->mergeManager->destinationPath($destination);
70 70
         }
71 71
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         if (is_string($folder) && $this->chunksManager->validFolder($folder)) {
81 81
             $this->folder = $folder;
82
-        } elseif (empty($this->folder) || ! $this->chunksManager->validFolder($this->folder)) {
82
+        } elseif (empty($this->folder) || !$this->chunksManager->validFolder($this->folder)) {
83 83
             throw new StrategyException('Chunks folder cannot be empty');
84 84
         }
85 85
 
Please login to merge, or discard this patch.
src/Strategies/StrategyFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     private function buildInstance(string $strategy)
32 32
     {
33
-        if (! method_exists($strategy, 'instance')) {
33
+        if (!method_exists($strategy, 'instance')) {
34 34
             throw new StrategyException('Cannot instantiate strategy instance');
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/ChunkyServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,18 +68,18 @@
 block discarded – undo
68 68
         $this->app->bind(ChunksFilesystem::class, ChunksFilesystem::class);
69 69
         $this->app->bind(MergeFilesystem::class, MergeFilesystem::class);
70 70
 
71
-        $this->app->singleton(ChunksManagerContract::class, function (Container $app) {
71
+        $this->app->singleton(ChunksManagerContract::class, function(Container $app) {
72 72
             return new ChunksManager(new ChunkySettings(
73 73
                 $app->make('config')
74 74
             ));
75 75
         });
76
-        $this->app->singleton(MergeManagerContract::class, function (Container $app) {
76
+        $this->app->singleton(MergeManagerContract::class, function(Container $app) {
77 77
             return new MergeManager(new ChunkySettings(
78 78
                 $app->make('config')
79 79
             ));
80 80
         });
81 81
 
82
-        $this->app->singleton(StrategyFactoryContract::class, function (Container $app) {
82
+        $this->app->singleton(StrategyFactoryContract::class, function(Container $app) {
83 83
             return new StrategyFactory(new ChunkySettings(
84 84
                 $app->make('config')
85 85
             ));
Please login to merge, or discard this patch.
src/Support/MergeFilesystem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /** {@inheritdoc} */
10 10
     public function disk($disk = null): ?string
11 11
     {
12
-        if (! empty($disk) && is_string($disk)) {
12
+        if (!empty($disk) && is_string($disk)) {
13 13
             $this->disk = $disk;
14 14
         }
15 15
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     /** {@inheritdoc} */
20 20
     public function folder($folder = null): ?string
21 21
     {
22
-        if (! empty($folder) && is_string($folder)) {
22
+        if (!empty($folder) && is_string($folder)) {
23 23
             $this->folder = $folder;
24 24
         }
25 25
 
Please login to merge, or discard this patch.
src/Support/FileSystem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     public function makeDirectory(string $folder): bool
58 58
     {
59
-        if (! Str::startsWith($folder, $this->folder)) {
59
+        if (!Str::startsWith($folder, $this->folder)) {
60 60
             $folder = $this->folder.$folder;
61 61
         }
62 62
 
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.
src/Strategies/FlysystemStrategy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     protected function mergeChunks(string $destination, array $chunks): bool
14 14
     {
15
-        if (! $this->chunksManager->chunksFilesystem()->concatenate($destination, $chunks)) {
15
+        if (!$this->chunksManager->chunksFilesystem()->concatenate($destination, $chunks)) {
16 16
             throw new StrategyException('Unable to concatenate chunks');
17 17
         }
18 18
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         // Retrieve chunks
28 28
         $chunks = $this->chunksManager->chunks(
29 29
             $this->chunksFolder()
30
-        )->map(function (Chunk $item) {
30
+        )->map(function(Chunk $item) {
31 31
             return $item->getPath();
32 32
         });
33 33
         $chunk = $this->chunksManager->chunks(
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             $this->mergeManager->getMergeOptions()
46 46
         );
47 47
 
48
-        if (! $path) {
48
+        if (!$path) {
49 49
             throw new StrategyException('An error occurred while moving merge to destination');
50 50
         }
51 51
 
Please login to merge, or discard this patch.