Passed
Push — master ( 7768f9...daf5ec )
by David
01:16
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
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.