@@ -13,7 +13,6 @@ discard block |
||
| 13 | 13 | namespace CSVelte; |
| 14 | 14 | |
| 15 | 15 | use CSVelte\Contract\Streamable; |
| 16 | - |
|
| 17 | 16 | use CSVelte\Exception\SnifferException; |
| 18 | 17 | use CSVelte\Sniffer\SniffDelimiterByConsistency; |
| 19 | 18 | use CSVelte\Sniffer\SniffDelimiterByDistribution; |
@@ -21,9 +20,7 @@ discard block |
||
| 21 | 20 | use CSVelte\Sniffer\SniffLineTerminatorByCount; |
| 22 | 21 | use CSVelte\Sniffer\SniffQuoteAndDelimByAdjacency; |
| 23 | 22 | use CSVelte\Sniffer\SniffQuoteStyle; |
| 24 | -use Noz\Collection\Collection; |
|
| 25 | 23 | use function Noz\to_array; |
| 26 | -use RuntimeException; |
|
| 27 | 24 | |
| 28 | 25 | use function Noz\collect; |
| 29 | 26 | use function Stringy\create as s; |
@@ -178,13 +178,13 @@ |
||
| 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 | } |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | if (!$isHeader) { |
| 74 | 74 | // use standard deviation to determine if header is wildly different length than others |
| 75 | 75 | $mean = $length->average(); |
| 76 | - $sd = sqrt($length->map(function ($len) use ($mean) { |
|
| 76 | + $sd = sqrt($length->map(function($len) use ($mean) { |
|
| 77 | 77 | return pow($len - $mean, 2); |
| 78 | 78 | })->average()); |
| 79 | 79 | |