Passed
Push — master ( 88c2b1...66d28d )
by David
01:23
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/Client.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public static function make($param1 = null, $param2 = null, $options = [])
90 90
     {
91
-        if (preg_match('/\.jar$/', func_get_arg(0)))
91
+        if(preg_match('/\.jar$/', func_get_arg(0)))
92 92
         {
93 93
             return new CLIClient($param1, $param2);
94 94
         }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     {
174 174
         if(static::MODE == 'cli' && is_numeric($size))
175 175
         {
176
-            $this->chunkSize = (int)$size;
176
+            $this->chunkSize = (int) $size;
177 177
         }
178 178
         elseif(static::MODE == 'web')
179 179
         {
Please login to merge, or discard this 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.
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.