@@ -15,7 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | use ArrayAccess; |
| 17 | 17 | use ArrayIterator; |
| 18 | -use BadMethodCallException; |
|
| 19 | 18 | use Countable; |
| 20 | 19 | use InvalidArgumentException; |
| 21 | 20 | use Iterator; |
@@ -14,13 +14,10 @@ |
||
| 14 | 14 | namespace CSVelte; |
| 15 | 15 | |
| 16 | 16 | use CSVelte\Collection\AbstractCollection; |
| 17 | -use CSVelte\Collection\Collection; |
|
| 18 | -use CSVelte\Collection\MultiCollection; |
|
| 19 | 17 | use CSVelte\Collection\NumericCollection; |
| 20 | 18 | use CSVelte\Collection\TabularCollection; |
| 21 | 19 | use CSVelte\Contract\Streamable; |
| 22 | 20 | use CSVelte\Exception\TasterException; |
| 23 | - |
|
| 24 | 21 | use DateTime; |
| 25 | 22 | use Exception; |
| 26 | 23 | use OutOfBoundsException; |
@@ -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 | } |