@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function register() |
32 | 32 | { |
33 | - $this->app->singleton('chunky', function (Container $app) { |
|
33 | + $this->app->singleton('chunky', function(Container $app) { |
|
34 | 34 | $settings = new ChunkySettings( |
35 | 35 | $app->make('config') |
36 | 36 | ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ); |
42 | 42 | }); |
43 | 43 | |
44 | - $this->app->singleton(StrategyFactoryContract::class, function (Container $app) { |
|
44 | + $this->app->singleton(StrategyFactoryContract::class, function(Container $app) { |
|
45 | 45 | return new StrategyFactory( |
46 | 46 | $app->make('config')->get('chunky.strategies') |
47 | 47 | ); |
@@ -107,7 +107,7 @@ |
||
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 | ) { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | |
38 | 38 | public function __call($method, $parameters) |
39 | 39 | { |
40 | - if (! method_exists($this, $method)) { |
|
40 | + if (!method_exists($this, $method)) { |
|
41 | 41 | return $this->forwardCallTo($this->strategy, $method, $parameters); |
42 | 42 | } |
43 | 43 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | $chunk = Arr::first($chunks); |
26 | 26 | |
27 | - if (! $this->manager->chunksFilesystem()->concatenate($chunk, ...$chunks)) { |
|
27 | + if (!$this->manager->chunksFilesystem()->concatenate($chunk, ...$chunks)) { |
|
28 | 28 | throw new StrategyException('Unable to concatenate chunks'); |
29 | 29 | } |
30 | 30 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | private function buildInstance(string $strategy, $manager = null) |
31 | 31 | { |
32 | - if (! method_exists($strategy, 'newInstance')) { |
|
32 | + if (!method_exists($strategy, 'newInstance')) { |
|
33 | 33 | throw new StrategyException('Cannot instantiate strategy instance'); |
34 | 34 | } |
35 | 35 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function default($manager = null): MergeStrategy |
43 | 43 | { |
44 | - if (! Arr::has($this->config, 'default')) { |
|
44 | + if (!Arr::has($this->config, 'default')) { |
|
45 | 45 | throw new StrategyException('Undefined default strategy'); |
46 | 46 | } |
47 | 47 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | ->inFormat($this->guessFormat()) |
16 | 16 | ->concatWithoutTranscoding(); |
17 | 17 | |
18 | - if (! empty($visibility = $this->visibility())) { |
|
18 | + if (!empty($visibility = $this->visibility())) { |
|
19 | 19 | $exporter->withVisibility($visibility); |
20 | 20 | } |
21 | 21 |
@@ -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; |