Passed
Push — master ( 1dbc04...81fcb3 )
by Igor
03:31 queued 44s
created
src/Transport/Http.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         }
222 222
 
223 223
         $new->timeOut($this->settings()->getTimeOut());
224
-        $new->connectTimeOut($this->_connectTimeOut);//->keepAlive(); // one sec
224
+        $new->connectTimeOut($this->_connectTimeOut); //->keepAlive(); // one sec
225 225
         $new->verbose(boolval($this->_verbose));
226 226
 
227 227
         return $new;
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         $request = $this->newRequest($extendinfo);
318 318
         $request->url($url);
319 319
 
320
-        $request->setCallbackFunction(function (CurlerRequest $request) {
320
+        $request->setCallbackFunction(function(CurlerRequest $request) {
321 321
             $handle = $request->getInfileHandle();
322 322
             if (is_resource($handle)) {
323 323
                 fclose($handle);
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                 }
457 457
 
458 458
 
459
-                $request->setResultFileHandle($fout, $isGz)->setCallbackFunction(function (CurlerRequest $request) {
459
+                $request->setResultFileHandle($fout, $isGz)->setCallbackFunction(function(CurlerRequest $request) {
460 460
                     fclose($request->getResultFileHandle());
461 461
                 });
462 462
             }
@@ -643,11 +643,11 @@  discard block
 block discarded – undo
643 643
             if (!is_callable($callable)) {
644 644
                 if ($streamRW->isWrite()) {
645 645
 
646
-                    $callable = function ($ch, $fd, $length) use ($stream) {
646
+                    $callable = function($ch, $fd, $length) use ($stream) {
647 647
                         return ($line = fread($stream, $length)) ? $line : '';
648 648
                     };
649 649
                 } else {
650
-                    $callable = function ($ch, $fd) use ($stream) {
650
+                    $callable = function($ch, $fd) use ($stream) {
651 651
                         return fwrite($stream, $fd);
652 652
                     };
653 653
                 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -685,8 +685,9 @@
 block discarded – undo
685 685
             }
686 686
             return $response;
687 687
         } finally {
688
-            if ($streamRW->isWrite())
689
-                fclose($stream);
688
+            if ($streamRW->isWrite()) {
689
+                            fclose($stream);
690
+            }
690 691
         }
691 692
 
692 693
 
Please login to merge, or discard this patch.
src/Quote/FormatLine.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@
 block discarded – undo
32 32
      * @param bool $skipEncode
33 33
      * @return string
34 34
      */
35
-    public static function Insert(array $row,bool $skipEncode=false)
35
+    public static function Insert(array $row, bool $skipEncode = false)
36 36
     {
37
-        return self::strictQuote('Insert')->quoteRow($row,$skipEncode);
37
+        return self::strictQuote('Insert')->quoteRow($row, $skipEncode);
38 38
     }
39 39
 
40 40
     /**
Please login to merge, or discard this patch.
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.