Passed
Push — releases/v0.3 ( 02b4c1...da0bd3 )
by Luke
02:13
created
src/CSVelte/IO/BufferStream.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
         $top          = substr($this->buffer, 0, $start);
166 166
         $data         = substr($this->buffer, $start, $length);
167 167
         $bottom       = substr($this->buffer, $start + $length);
168
-        $this->buffer = $top . $bottom;
168
+        $this->buffer = $top.$bottom;
169 169
 
170 170
         return $data;
171 171
     }
Please login to merge, or discard this patch.
src/CSVelte/Dialect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
             if (property_exists($this, $attr)) {
105 105
                 // find the appropriate setter...
106 106
                 foreach (['set', 'setIs', 'setHas'] as $prefix) {
107
-                    $setter = $prefix . ucfirst(strtolower($attr));
107
+                    $setter = $prefix.ucfirst(strtolower($attr));
108 108
                     if (method_exists($this, $setter)) {
109 109
                         $this->{$setter}($val);
110 110
                     }
Please login to merge, or discard this patch.
src/CSVelte/Traits/IsReadable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
             }
52 52
             $buffer .= $byte;
53 53
             // Break when a new line is found or the max length - 1 is reached
54
-            if (array_reduce($eol, function ($carry, $eol) use ($buffer) {
54
+            if (array_reduce($eol, function($carry, $eol) use ($buffer) {
55 55
                     if (!$carry) {
56 56
                         $eollen = 0 - strlen($eol);
57 57
 
Please login to merge, or discard this patch.
src/CSVelte/Traits/IsWritable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function writeLine($line, $eol = PHP_EOL)
37 37
     {
38
-        return $this->write($line . $eol);
38
+        return $this->write($line.$eol);
39 39
     }
40 40
 
41 41
     abstract public function isWritable();
Please login to merge, or discard this patch.
src/CSVelte/IO/StreamResource.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         if (!$this->isConnected()) {
243 243
             /** @var IOException $e */
244 244
             $e          = null;
245
-            $errhandler = function () use (&$e) {
245
+            $errhandler = function() use (&$e) {
246 246
                 $e = new IOException(sprintf(
247 247
                     'Could not open connection for %s using mode %s',
248 248
                     $this->getUri(),
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 
546 546
             return $this;
547 547
         }
548
-        throw new InvalidArgumentException('Context options must be an array, got: ' . gettype($options));
548
+        throw new InvalidArgumentException('Context options must be an array, got: '.gettype($options));
549 549
     }
550 550
 
551 551
     /**
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 
570 570
             return $this;
571 571
         }
572
-        throw new InvalidArgumentException('Context parameters must be an array, got: ' . gettype($params));
572
+        throw new InvalidArgumentException('Context parameters must be an array, got: '.gettype($params));
573 573
     }
574 574
 
575 575
     /**
Please login to merge, or discard this patch.
src/CSVelte/Sniffer/SniffLineTerminatorByCount.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@
 block discarded – undo
35 35
         // in this case we really only care about newlines so we pass in a comma as the delim
36 36
         $str = $this->replaceQuotedSpecialChars($data, ',');
37 37
         $eols = [
38
-            static::EOL_WINDOWS => "\r\n",  // 0x0D - 0x0A - Windows, DOS OS/2
39
-            static::EOL_UNIX    => "\n",    // 0x0A -      - Unix, OSX
40
-            static::EOL_OTHER   => "\r",    // 0x0D -      - Other
38
+            static::EOL_WINDOWS => "\r\n", // 0x0D - 0x0A - Windows, DOS OS/2
39
+            static::EOL_UNIX    => "\n", // 0x0A -      - Unix, OSX
40
+            static::EOL_OTHER   => "\r", // 0x0D -      - Other
41 41
         ];
42 42
 
43 43
         $curCount = 0;
Please login to merge, or discard this patch.
src/CSVelte/Sniffer/AbstractSniffer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
         if (is_null($eol)) {
65 65
             $eol = "\r\n|\r|\n";
66 66
         }
67
-        return preg_replace_callback('/([\'"])(.*)\1/imsU', function ($matches) use ($delim, $eol) {
67
+        return preg_replace_callback('/([\'"])(.*)\1/imsU', function($matches) use ($delim, $eol) {
68 68
             $ret = preg_replace("/({$eol})/", static::PLACEHOLDER_NEWLINE, $matches[0]);
69 69
             if (!is_null($delim)) {
70 70
                 $ret = str_replace($delim, static::PLACEHOLDER_DELIM, $ret);
Please login to merge, or discard this patch.
src/CSVelte/Writer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
                         $field = s($field);
121 121
                         if ($field->contains($d->getQuoteChar())) {
122 122
                             $escapeChar = $d->isDoubleQuote() ? $d->getQuoteChar() : '\\' /*$d->getEscapeChar()*/;
123
-                            $field = $field->replace($d->getQuoteChar(), $d->getQuoteChar() . $d->getQuoteChar());
123
+                            $field = $field->replace($d->getQuoteChar(), $d->getQuoteChar().$d->getQuoteChar());
124 124
                         }
125 125
                         $field = $field->surround($d->getQuoteChar());
126 126
                     }
Please login to merge, or discard this patch.
src/CSVelte/Sniffer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -178,13 +178,13 @@
 block discarded – undo
178 178
 
179 179
     protected function sniffQuotingStyle($data, $delimiter, $lineTerminator)
180 180
     {
181
-        $sniffer = new SniffQuoteStyle(compact( 'lineTerminator', 'delimiter'));
181
+        $sniffer = new SniffQuoteStyle(compact('lineTerminator', 'delimiter'));
182 182
         return $sniffer->sniff($data);
183 183
     }
184 184
 
185 185
     protected function sniffHasHeader($data, $delimiter, $lineTerminator)
186 186
     {
187
-        $sniffer = new SniffHeaderByDataType(compact(  'lineTerminator', 'delimiter'));
187
+        $sniffer = new SniffHeaderByDataType(compact('lineTerminator', 'delimiter'));
188 188
         return $sniffer->sniff($data);
189 189
     }
190 190
 }
Please login to merge, or discard this patch.