Passed
Push — master ( ee0b8d...da07ac )
by David
01:28
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/Client.php 2 patches
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@  discard block
 block discarded – undo
77 77
         if (preg_match('/\.jar$/', func_get_arg(0)))
78 78
         {
79 79
             return new CLIClient($param1, $param2);
80
-        }
81
-        else
80
+        } else
82 81
         {
83 82
             return new WebClient($param1, $param2, $options);
84 83
         }
@@ -106,15 +105,13 @@  discard block
 block discarded – undo
106 105
         if($callback instanceof Closure)
107 106
         {
108 107
             $this->callback = $callback;
109
-        }
110
-        elseif(is_callable($callback))
108
+        } elseif(is_callable($callback))
111 109
         {
112 110
             $this->callback = function($chunk) use($callback)
113 111
             {
114 112
                 return call_user_func_array($callback, [$chunk]);
115 113
             };
116
-        }
117
-        else
114
+        } else
118 115
         {
119 116
             throw new Exception('Invalid callback');
120 117
         }
@@ -144,12 +141,10 @@  discard block
 block discarded – undo
144 141
         if(static::MODE == 'cli' && is_numeric($size))
145 142
         {
146 143
             $this->chunkSize = (int)$size;
147
-        }
148
-        elseif(static::MODE == 'web')
144
+        } elseif(static::MODE == 'web')
149 145
         {
150 146
             throw new Exception('Chunk size is not supported on web mode');
151
-        }
152
-        else
147
+        } else
153 148
         {
154 149
             throw new Exception("$size is not a valid chunk size");
155 150
         }
Please login to merge, or discard this patch.
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.
src/Clients/WebClient.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
73 73
         if(is_string($host) && filter_var($host, FILTER_VALIDATE_URL))
74 74
         {
75 75
             $this->setUrl($host);
76
-        }
77
-        elseif($host)
76
+        } elseif($host)
78 77
         {
79 78
             $this->setHost($host);
80 79
         }
@@ -293,8 +292,7 @@  discard block
 block discarded – undo
293 292
         if(isset($this->cache[sha1($file)][$type]))
294 293
         {
295 294
             return $this->cache[sha1($file)][$type];
296
-        }
297
-        elseif(!isset($retries[sha1($file)]))
295
+        } elseif(!isset($retries[sha1($file)]))
298 296
         {
299 297
             $retries[sha1($file)] = $this->retries;
300 298
         }
@@ -375,8 +373,7 @@  discard block
 block discarded – undo
375 373
         if(is_null($this->callback))
376 374
         {
377 375
             $this->response = curl_exec($curl);
378
-        }
379
-        else
376
+        } else
380 377
         {
381 378
             $this->response = '';
382 379
             curl_exec($curl);
Please login to merge, or discard this patch.
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.