@@ -91,8 +91,8 @@ |
||
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 | /** |
@@ -185,10 +185,10 @@ discard block |
||
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 |
||
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 | } |
@@ -513,12 +513,12 @@ discard block |
||
513 | 513 | return $this->guessDelimByDistribution($decision, $eol); |
514 | 514 | } catch (TasterException $e) { |
515 | 515 | // if somehow we STILL can't come to a consensus, then fall back to a |
516 | - // "preferred delimiters" list... |
|
517 | - foreach ($this->delims as $key => $chr) { |
|
518 | - if (collect($decision)->contains($chr)) { |
|
519 | - return $chr; |
|
520 | - } |
|
521 | - } |
|
516 | + // "preferred delimiters" list... |
|
517 | + foreach ($this->delims as $key => $chr) { |
|
518 | + if (collect($decision)->contains($chr)) { |
|
519 | + return $chr; |
|
520 | + } |
|
521 | + } |
|
522 | 522 | } |
523 | 523 | } |
524 | 524 | |
@@ -588,8 +588,8 @@ discard block |
||
588 | 588 | })->map(function ($dists) { |
589 | 589 | return $dists->average(); |
590 | 590 | })->sort() |
591 | - ->reverse() |
|
592 | - ->getKeyAtPosition(0)]; |
|
591 | + ->reverse() |
|
592 | + ->getKeyAtPosition(0)]; |
|
593 | 593 | } catch (Exception $e) { |
594 | 594 | throw new TasterException('delimiter cannot be determined by distribution', TasterException::ERR_DELIMITER); |
595 | 595 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | public function __construct($fields) |
62 | 62 | { |
63 | 63 | $this->setFields($fields) |
64 | - ->rewind(); |
|
64 | + ->rewind(); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -21,7 +21,6 @@ |
||
21 | 21 | if (if $file->hasHeader()) { |
22 | 22 | $header = $file->getHeader() |
23 | 23 | } |
24 | - |
|
25 | 24 | * you can instead simply call $header->getHeader() and handle this exception if |
26 | 25 | * said file has no header |
27 | 26 | * |