@@ -56,7 +56,7 @@ |
||
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) |
@@ -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 | /** |
@@ -261,20 +261,20 @@ |
||
261 | 261 | throw new TasterException("quoteChar and delimiter cannot be determined", TasterException::ERR_QUOTE_AND_DELIM); |
262 | 262 | } |
263 | 263 | |
264 | - /** |
|
265 | - * Take a list of likely delimiter characters and find the one that occurs |
|
266 | - * the most consistent amount of times within the provided data. |
|
267 | - * |
|
268 | - * @param string The character(s) used for newlines |
|
269 | - * @return string One of four Flavor::QUOTING_* constants |
|
270 | - * @see \CSVelte\Flavor for possible quote style constants |
|
271 | - * @access protected |
|
272 | - * @todo Refactor this method--It needs more thorough testing against a wider |
|
273 | - * variety of CSV data to be sure it works reliably. And I'm sure there |
|
274 | - * are many performance and logic improvements that could be made. This |
|
275 | - * is essentially a first draft. |
|
276 | - * @todo Use replaceQuotedSpecialChars rather than removeQuotedStrings |
|
277 | - */ |
|
264 | + /** |
|
265 | + * Take a list of likely delimiter characters and find the one that occurs |
|
266 | + * the most consistent amount of times within the provided data. |
|
267 | + * |
|
268 | + * @param string The character(s) used for newlines |
|
269 | + * @return string One of four Flavor::QUOTING_* constants |
|
270 | + * @see \CSVelte\Flavor for possible quote style constants |
|
271 | + * @access protected |
|
272 | + * @todo Refactor this method--It needs more thorough testing against a wider |
|
273 | + * variety of CSV data to be sure it works reliably. And I'm sure there |
|
274 | + * are many performance and logic improvements that could be made. This |
|
275 | + * is essentially a first draft. |
|
276 | + * @todo Use replaceQuotedSpecialChars rather than removeQuotedStrings |
|
277 | + */ |
|
278 | 278 | protected function lickDelimiter($eol = "\n") |
279 | 279 | { |
280 | 280 | $delimiters = array(",", "\t", "|", ":", ";", "/", '\\'); |
@@ -19,7 +19,6 @@ |
||
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 | * |