Passed
Push — master ( 883337...35c69a )
by Igor
23:38 queued 13:39
created
src/Quote/StrictQuoteLine.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
      * @param bool $skipEncode
58 58
      * @return string
59 59
      */
60
-    public function quoteRow($row,bool $skipEncode=false )
60
+    public function quoteRow($row, bool $skipEncode = false)
61 61
     {
62
-        return implode($this->settings['Delimiter'], $this->quoteValue($row,$skipEncode));
62
+        return implode($this->settings['Delimiter'], $this->quoteValue($row, $skipEncode));
63 63
     }
64 64
 
65 65
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @param bool $skipEncode
68 68
      * @return array
69 69
      */
70
-    public function quoteValue($row,bool $skipEncode=false)
70
+    public function quoteValue($row, bool $skipEncode = false)
71 71
     {
72 72
         $enclosure = $this->settings['Enclosure'];
73 73
         $delimiter = $this->settings['Delimiter'];
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
                 // single quotation marks with the same screening rules as above.
98 98
                 // as in the TabSeparated format, and then the resulting string is output in InsertRow in double quotes.
99 99
 
100
-                $value       = array_map(
101
-                    function ($v) use ($enclosure_esc, $encode_esc) {
100
+                $value = array_map(
101
+                    function($v) use ($enclosure_esc, $encode_esc) {
102 102
                         return is_string($v) ? $this->encodeString($v, $enclosure_esc, $encode_esc) : $v;
103 103
                     },
104 104
                     $value
105 105
                 );
106
-                $resultArray = FormatLine::Insert($value,($encodeEnclosure==='\\'?true:false));
106
+                $resultArray = FormatLine::Insert($value, ($encodeEnclosure === '\\' ?true:false));
107 107
                 return $encodeArray . '[' . $resultArray . ']' . $encodeArray;
108 108
             }
109 109
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,8 +118,9 @@
 block discarded – undo
118 118
                     return str_replace(["\t", "\n"], ['\\t', '\\n'], $value);
119 119
                 }
120 120
 
121
-                if (!$skipEncode)
122
-                $value = $this->encodeString($value, $enclosure_esc, $encode_esc);
121
+                if (!$skipEncode) {
122
+                                $value = $this->encodeString($value, $enclosure_esc, $encode_esc);
123
+                }
123 124
 
124 125
                 return $enclosure . $value . $enclosure;
125 126
             }
Please login to merge, or discard this patch.
src/Query/Query.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     private $degenerations = [];
24 24
 
25
-    private $supportFormats=[
25
+    private $supportFormats = [
26 26
         "FORMAT\\s+TSVRaw",
27 27
         "FORMAT\\s+TSVWithNamesAndTypes",
28 28
         "FORMAT\\s+TSVWithNames",
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         if (null === $this->format) {
72 72
             return false;
73 73
         }
74
-        $supportFormats = implode("|",$this->supportFormats);
74
+        $supportFormats = implode("|", $this->supportFormats);
75 75
 
76 76
         $this->sql = trim($this->sql);
77 77
         if (substr($this->sql, -1) == ';') {
Please login to merge, or discard this patch.
src/Transport/CurlerRolling.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -290,9 +290,9 @@  discard block
 block discarded – undo
290 290
 
291 291
 
292 292
             if (is_object($done['handle'])) {
293
-                $key = spl_object_id( $done['handle'] );
293
+                $key = spl_object_id($done['handle']);
294 294
             } else {
295
-                $key = (string) $done['handle'] ;
295
+                $key = (string) $done['handle'];
296 296
             }
297 297
 
298 298
             $task_id = $this->handleMapTasks[$key];
@@ -374,9 +374,9 @@  discard block
 block discarded – undo
374 374
         curl_multi_add_handle($this->handlerMulti(), $h);
375 375
 
376 376
         if (is_object($h)) {
377
-            $key = spl_object_id( $h );
377
+            $key = spl_object_id($h);
378 378
         } else {
379
-            $key = (string) $h ;
379
+            $key = (string) $h;
380 380
         }
381 381
 
382 382
         $this->handleMapTasks[$key] = $task_id;
Please login to merge, or discard this patch.
src/Statement.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
         foreach (['meta', 'data', 'totals', 'extremes', 'rows', 'rows_before_limit_at_least', 'statistics'] as $key) {
246 246
 
247 247
             if (isset($this->_rawData[$key])) {
248
-                if ($key=='data') {
249
-                    $data=$this->_rawData[$key];
248
+                if ($key == 'data') {
249
+                    $data = $this->_rawData[$key];
250 250
                 } else {
251 251
                     $this->{$key} = $this->_rawData[$key];
252 252
                 }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
             throw new QueryException('Can`t find meta');
258 258
         }
259 259
 
260
-        $isJSONCompact=(stripos($this->format,'JSONCompact')!==false?true:false);
260
+        $isJSONCompact = (stripos($this->format, 'JSONCompact') !== false ?true:false);
261 261
         $this->array_data = [];
262 262
         foreach ($data as $rows) {
263 263
             $r = [];
@@ -419,14 +419,14 @@  discard block
 block discarded – undo
419 419
      */
420 420
     public function resetIterator()
421 421
     {
422
-        $this->iterator=0;
422
+        $this->iterator = 0;
423 423
     }
424 424
 
425 425
     public function fetchRow($key = null)
426 426
     {
427 427
         $this->init();
428 428
 
429
-        $position=$this->iterator;
429
+        $position = $this->iterator;
430 430
 
431 431
         if (!isset($this->array_data[$position])) {
432 432
             return null;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -379,7 +379,9 @@
 block discarded – undo
379 379
             return null;
380 380
         }
381 381
 
382
-        if (!$key) return $this->statistics;
382
+        if (!$key) {
383
+            return $this->statistics;
384
+        }
383 385
 
384 386
         if (!isset($this->statistics[$key])) {
385 387
             return null;
Please login to merge, or discard this patch.
src/Transport/CurlerRequest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     public function setStdErrOut($stream)
308 308
     {
309 309
         if (is_resource($stream)) {
310
-            $this->stdErrOut=$stream;
310
+            $this->stdErrOut = $stream;
311 311
         }
312 312
 
313 313
     }
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
                 $curl_opt[CURLOPT_POSTFIELDS] = $this->parameters;
737 737
 
738 738
                 if (!is_array($this->parameters)) {
739
-                    $this->header('Content-Length',  mb_strlen($this->parameters, '8bit'));
739
+                    $this->header('Content-Length', mb_strlen($this->parameters, '8bit'));
740 740
                 }
741 741
             }
742 742
         }
@@ -767,9 +767,9 @@  discard block
 block discarded – undo
767 767
         }
768 768
 
769 769
         if ($this->options[CURLOPT_VERBOSE]) {
770
-            $msg="\n-----------BODY REQUEST----------\n" . $curl_opt[CURLOPT_POSTFIELDS] . "\n------END--------\n";
770
+            $msg = "\n-----------BODY REQUEST----------\n" . $curl_opt[CURLOPT_POSTFIELDS] . "\n------END--------\n";
771 771
             if ($this->stdErrOut && is_resource($this->stdErrOut)) {
772
-                fwrite($this->stdErrOut,$msg);
772
+                fwrite($this->stdErrOut, $msg);
773 773
             } else {
774 774
                 echo $msg;
775 775
             }
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
 
778 778
         if ($this->stdErrOut) {
779 779
             if (is_resource($this->stdErrOut)) {
780
-                $curl_opt[CURLOPT_STDERR]=$this->stdErrOut;
780
+                $curl_opt[CURLOPT_STDERR] = $this->stdErrOut;
781 781
             }
782 782
         }
783 783
 
Please login to merge, or discard this patch.