Passed
Push — master ( daf5ec...c13cfb )
by David
01:33
created
src/Client.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -109,8 +109,7 @@  discard block
 block discarded – undo
109 109
         if (preg_match('/\.jar$/', func_get_arg(0)))
110 110
         {
111 111
             return new CLIClient($param1, $param2);
112
-        }
113
-        else
112
+        } else
114 113
         {
115 114
             return new WebClient($param1, $param2, $options);
116 115
         }
@@ -154,15 +153,13 @@  discard block
 block discarded – undo
154 153
         if($callback instanceof Closure)
155 154
         {
156 155
             $this->callback = $callback;
157
-        }
158
-        elseif(is_callable($callback))
156
+        } elseif(is_callable($callback))
159 157
         {
160 158
             $this->callback = function($chunk) use($callback)
161 159
             {
162 160
                 return call_user_func_array($callback, [$chunk]);
163 161
             };
164
-        }
165
-        else
162
+        } else
166 163
         {
167 164
             throw new Exception('Invalid callback');
168 165
         }
@@ -192,12 +189,10 @@  discard block
 block discarded – undo
192 189
         if(static::MODE == 'cli' && is_numeric($size))
193 190
         {
194 191
             $this->chunkSize = (int)$size;
195
-        }
196
-        elseif(static::MODE == 'web')
192
+        } elseif(static::MODE == 'web')
197 193
         {
198 194
             throw new Exception('Chunk size is not supported on web mode');
199
-        }
200
-        else
195
+        } else
201 196
         {
202 197
             throw new Exception("$size is not a valid chunk size");
203 198
         }
@@ -242,12 +237,10 @@  discard block
 block discarded – undo
242 237
         if(is_null($recursive))
243 238
         {
244 239
             return $this->request('meta', $file);
245
-        }
246
-        elseif(in_array($recursive, ['text', 'html', 'ignore']))
240
+        } elseif(in_array($recursive, ['text', 'html', 'ignore']))
247 241
         {
248 242
             return $this->request("rmeta/$recursive", $file);
249
-        }
250
-        else
243
+        } else
251 244
         {
252 245
             throw new Exception("Unknown recursive type (must be text, html, ignore or null)");
253 246
         }
Please login to merge, or discard this patch.