Completed
Push — releases/v0.2.1 ( 74e7c5...3696a4 )
by Luke
09:43
created
src/CSVelte/Table/AbstractRow.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     public function __construct($fields)
57 57
     {
58 58
         $this->setFields($fields)
59
-             ->rewind();
59
+                ->rewind();
60 60
     }
61 61
 
62 62
     protected function setFields($fields)
Please login to merge, or discard this patch.
src/CSVelte/Reader.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@
 block discarded – undo
91 91
     public function __construct($input, $flavor = null)
92 92
     {
93 93
         $this->setSource($input)
94
-             ->setFlavor($flavor)
95
-             ->rewind();
94
+                ->setFlavor($flavor)
95
+                ->rewind();
96 96
     }
97 97
 
98 98
     /**
Please login to merge, or discard this patch.
src/CSVelte/Exception/HeaderException.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
 if (if $file->hasHeader()) {
20 20
     $header = $file->getHeader()
21 21
 }
22
-
23 22
  * you can instead simply call $header->getHeader() and handle this exception if
24 23
  * said file has no header
25 24
  *
Please login to merge, or discard this patch.
src/CSVelte/IO/BufferStream.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -267,16 +267,16 @@
 block discarded – undo
267 267
         return strlen($data);
268 268
     }
269 269
 
270
-     /**
271
-      * Seekability accessor.
272
-      *
273
-      * Despite the fact that any class that implements this interface must also
274
-      * define methods such as seek, that is no guarantee that an
275
-      * object will necessarily be seekable. This method should tell the user
276
-      * whether a stream is, in fact, seekable.
277
-      *
278
-      * @return boolean True if seekable, false otherwise
279
-      */
270
+        /**
271
+         * Seekability accessor.
272
+         *
273
+         * Despite the fact that any class that implements this interface must also
274
+         * define methods such as seek, that is no guarantee that an
275
+         * object will necessarily be seekable. This method should tell the user
276
+         * whether a stream is, in fact, seekable.
277
+         *
278
+         * @return boolean True if seekable, false otherwise
279
+         */
280 280
     public function isSeekable()
281 281
     {
282 282
         return $this->seekable;
Please login to merge, or discard this patch.
src/CSVelte/Contract/Streamable.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -267,16 +267,16 @@
 block discarded – undo
267 267
         return strlen($data);
268 268
     }
269 269
 
270
-     /**
271
-      * Seekability accessor.
272
-      *
273
-      * Despite the fact that any class that implements this interface must also
274
-      * define methods such as seek, that is no guarantee that an
275
-      * object will necessarily be seekable. This method should tell the user
276
-      * whether a stream is, in fact, seekable.
277
-      *
278
-      * @return boolean True if seekable, false otherwise
279
-      */
270
+        /**
271
+         * Seekability accessor.
272
+         *
273
+         * Despite the fact that any class that implements this interface must also
274
+         * define methods such as seek, that is no guarantee that an
275
+         * object will necessarily be seekable. This method should tell the user
276
+         * whether a stream is, in fact, seekable.
277
+         *
278
+         * @return boolean True if seekable, false otherwise
279
+         */
280 280
     public function isSeekable()
281 281
     {
282 282
         return $this->seekable;
Please login to merge, or discard this patch.
src/CSVelte/IO/IteratorStream.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -267,16 +267,16 @@
 block discarded – undo
267 267
         return strlen($data);
268 268
     }
269 269
 
270
-     /**
271
-      * Seekability accessor.
272
-      *
273
-      * Despite the fact that any class that implements this interface must also
274
-      * define methods such as seek, that is no guarantee that an
275
-      * object will necessarily be seekable. This method should tell the user
276
-      * whether a stream is, in fact, seekable.
277
-      *
278
-      * @return boolean True if seekable, false otherwise
279
-      */
270
+        /**
271
+         * Seekability accessor.
272
+         *
273
+         * Despite the fact that any class that implements this interface must also
274
+         * define methods such as seek, that is no guarantee that an
275
+         * object will necessarily be seekable. This method should tell the user
276
+         * whether a stream is, in fact, seekable.
277
+         *
278
+         * @return boolean True if seekable, false otherwise
279
+         */
280 280
     public function isSeekable()
281 281
     {
282 282
         return $this->seekable;
Please login to merge, or discard this patch.
src/CSVelte/Taster.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -290,20 +290,20 @@  discard block
 block discarded – undo
290 290
         throw new TasterException("quoteChar and delimiter cannot be determined", TasterException::ERR_QUOTE_AND_DELIM);
291 291
     }
292 292
 
293
-     /**
294
-      * Take a list of likely delimiter characters and find the one that occurs
295
-      * the most consistent amount of times within the provided data.
296
-      *
297
-      * @param string The character(s) used for newlines
298
-      * @return string One of four Flavor::QUOTING_* constants
299
-      * @see \CSVelte\Flavor for possible quote style constants
300
-      * @todo Refactor this method--It needs more thorough testing against a wider
301
-      *     variety of CSV data to be sure it works reliably. And I'm sure there
302
-      *     are many performance and logic improvements that could be made. This
303
-      *     is essentially a first draft.
304
-      * @todo Can't use replaceQuotedSpecialChars rather than removeQuotedStrings
305
-      *     because the former requires u to know the delimiter
306
-      */
293
+        /**
294
+         * Take a list of likely delimiter characters and find the one that occurs
295
+         * the most consistent amount of times within the provided data.
296
+         *
297
+         * @param string The character(s) used for newlines
298
+         * @return string One of four Flavor::QUOTING_* constants
299
+         * @see \CSVelte\Flavor for possible quote style constants
300
+         * @todo Refactor this method--It needs more thorough testing against a wider
301
+         *     variety of CSV data to be sure it works reliably. And I'm sure there
302
+         *     are many performance and logic improvements that could be made. This
303
+         *     is essentially a first draft.
304
+         * @todo Can't use replaceQuotedSpecialChars rather than removeQuotedStrings
305
+         *     because the former requires u to know the delimiter
306
+         */
307 307
     protected function lickDelimiter($eol = "\n")
308 308
     {
309 309
         $frequencies = [];
@@ -380,16 +380,16 @@  discard block
 block discarded – undo
380 380
              *     which one has the best distribution, return that one.
381 381
              */
382 382
 
383
-             $decision = $dups->get($max);
384
-             try {
385
-                 return $this->guessDelimByDistribution($decision, $eol);
386
-             } catch (TasterException $e) {
387
-                 // if somehow we STILL can't come to a consensus, then fall back to a
388
-                 // "preferred delimiters" list...
389
-                 foreach ($this->delims as $key => $val) {
383
+                $decision = $dups->get($max);
384
+                try {
385
+                    return $this->guessDelimByDistribution($decision, $eol);
386
+                } catch (TasterException $e) {
387
+                    // if somehow we STILL can't come to a consensus, then fall back to a
388
+                    // "preferred delimiters" list...
389
+                    foreach ($this->delims as $key => $val) {
390 390
                     if ($delim = array_search($val, $decision)) return $delim;
391
-                 }
392
-             }
391
+                    }
392
+                }
393 393
         }
394 394
         return $delims
395 395
             ->sort()
@@ -446,8 +446,8 @@  discard block
 block discarded – undo
446 446
             })->map(function($dists) {
447 447
                 return $dists->average();
448 448
             })->sort()
449
-              ->reverse()
450
-              ->getKeyAtPosition(0)];
449
+                ->reverse()
450
+                ->getKeyAtPosition(0)];
451 451
         } catch (Exception $e) {
452 452
             throw new TasterException("delimiter cannot be determined by distribution", TasterException::ERR_DELIMITER);
453 453
         }
Please login to merge, or discard this patch.
src/CSVelte/IO/Resource.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
 
186 186
         // ok we're opening a new stream resource handle
187 187
         $this->setUri($uri)
188
-             ->setMode($mode)
189
-             ->setLazy($lazy)
190
-             ->setUseIncludePath($use_include_path)
191
-             ->setContext($context_options, $context_params);
188
+                ->setMode($mode)
189
+                ->setLazy($lazy)
190
+                ->setUseIncludePath($use_include_path)
191
+                ->setContext($context_options, $context_params);
192 192
         if (!$this->isLazy()) {
193 193
             $this->connect();
194 194
         }
@@ -351,9 +351,9 @@  discard block
 block discarded – undo
351 351
 
352 352
         $this->flag = '';
353 353
         $this->setBaseMode($base)
354
-             ->setIsPlus($plus == '+')
355
-             ->setIsText($flag == 't')
356
-             ->setIsBinary($flag == 'b');
354
+                ->setIsPlus($plus == '+')
355
+                ->setIsText($flag == 't')
356
+                ->setIsBinary($flag == 'b');
357 357
 
358 358
         return $this;
359 359
     }
Please login to merge, or discard this patch.