Passed
Branch master (2ad8bc)
by David
01:55 queued 32s
created
src/Metadata/DocumentMetadata.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
                 if(preg_match('/,/', $value))
102 102
                 {
103 103
                     $value = preg_split('/\s*,\s*/', $value);
104
-                }
105
-                else
104
+                } else
106 105
                 {
107 106
                     $value = preg_split('/\s+/', $value);
108 107
                 }
Please login to merge, or discard this patch.
src/Clients/WebClient.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -558,7 +558,7 @@
 block discarded – undo
558 558
             $options[CURLOPT_INFILESIZE] = filesize($file);
559 559
         }
560 560
         // other options for specific requests
561
-        elseif(in_array($type,  ['detectors', 'mime-types', 'parsers', 'version']))
561
+        elseif(in_array($type, ['detectors', 'mime-types', 'parsers', 'version']))
562 562
         {
563 563
             $options[CURLOPT_PUT] = false;
564 564
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@  discard block
 block discarded – undo
75 75
         if(is_string($host) && filter_var($host, FILTER_VALIDATE_URL))
76 76
         {
77 77
             $this->setUrl($host);
78
-        }
79
-        elseif($host)
78
+        } elseif($host)
80 79
         {
81 80
             $this->setHost($host);
82 81
         }
@@ -317,8 +316,7 @@  discard block
 block discarded – undo
317 316
         if($this->isCached($type, $file))
318 317
         {
319 318
             return $this->getCachedResponse($type, $file);
320
-        }
321
-        elseif(!isset($retries[sha1($file)]))
319
+        } elseif(!isset($retries[sha1($file)]))
322 320
         {
323 321
             $retries[sha1($file)] = $this->retries;
324 322
         }
@@ -405,8 +403,7 @@  discard block
 block discarded – undo
405 403
         if(is_null($this->callback))
406 404
         {
407 405
             $this->response = curl_exec($curl);
408
-        }
409
-        else
406
+        } else
410 407
         {
411 408
             $this->response = '';
412 409
             curl_exec($curl);
Please login to merge, or discard this patch.
src/Clients/CLIClient.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,8 +120,7 @@
 block discarded – undo
120 120
             try
121 121
             {
122 122
                 $this->exec(($this->java ?: 'java') . ' -version');
123
-            }
124
-            catch(Exception $exception)
123
+            } catch(Exception $exception)
125 124
             {
126 125
                 throw new Exception('Java command not found');
127 126
             }
Please login to merge, or discard this patch.
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.