Passed
Branch master (2ad8bc)
by David
01:55 queued 32s
created
src/Client.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public static function make($param1 = null, $param2 = null, $options = [], $check = true)
98 98
     {
99
-        if (preg_match('/\.jar$/', func_get_arg(0)))
99
+        if(preg_match('/\.jar$/', func_get_arg(0)))
100 100
         {
101 101
             return new CLIClient($param1, $param2, $check);
102 102
         }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     {
180 180
         if(static::MODE == 'cli' && is_numeric($size))
181 181
         {
182
-            $this->chunkSize = (int)$size;
182
+            $this->chunkSize = (int) $size;
183 183
         }
184 184
         elseif(static::MODE == 'web')
185 185
         {
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -99,8 +99,7 @@  discard block
 block discarded – undo
99 99
         if (preg_match('/\.jar$/', func_get_arg(0)))
100 100
         {
101 101
             return new CLIClient($param1, $param2, $check);
102
-        }
103
-        else
102
+        } else
104 103
         {
105 104
             return new WebClient($param1, $param2, $options, $check);
106 105
         }
@@ -142,15 +141,13 @@  discard block
 block discarded – undo
142 141
         if($callback instanceof Closure)
143 142
         {
144 143
             $this->callback = $callback;
145
-        }
146
-        elseif(is_callable($callback))
144
+        } elseif(is_callable($callback))
147 145
         {
148 146
             $this->callback = function($chunk) use($callback)
149 147
             {
150 148
                 return call_user_func_array($callback, [$chunk]);
151 149
             };
152
-        }
153
-        else
150
+        } else
154 151
         {
155 152
             throw new Exception('Invalid callback');
156 153
         }
@@ -180,12 +177,10 @@  discard block
 block discarded – undo
180 177
         if(static::MODE == 'cli' && is_numeric($size))
181 178
         {
182 179
             $this->chunkSize = (int)$size;
183
-        }
184
-        elseif(static::MODE == 'web')
180
+        } elseif(static::MODE == 'web')
185 181
         {
186 182
             throw new Exception('Chunk size is not supported on web mode');
187
-        }
188
-        else
183
+        } else
189 184
         {
190 185
             throw new Exception("$size is not a valid chunk size");
191 186
         }
@@ -230,12 +225,10 @@  discard block
 block discarded – undo
230 225
         if(is_null($recursive))
231 226
         {
232 227
             $response = $this->request('meta', $file);
233
-        }
234
-        elseif(in_array($recursive, ['text', 'html', 'ignore']))
228
+        } elseif(in_array($recursive, ['text', 'html', 'ignore']))
235 229
         {
236 230
             $response = $this->request("rmeta/$recursive", $file);
237
-        }
238
-        else
231
+        } else
239 232
         {
240 233
             throw new Exception("Unknown recursive type (must be text, html, ignore or null)");
241 234
         }
Please login to merge, or discard this patch.