@@ -91,7 +91,7 @@ |
||
| 91 | 91 | * |
| 92 | 92 | * @param string $data The data to check |
| 93 | 93 | * |
| 94 | - * @return bool |
|
| 94 | + * @return integer |
|
| 95 | 95 | */ |
| 96 | 96 | protected function isQuoted($data) |
| 97 | 97 | { |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | if (is_null($eol)) { |
| 65 | 65 | $eol = "\r\n|\r|\n"; |
| 66 | 66 | } |
| 67 | - return preg_replace_callback('/([\'"])(.*)\1/imsU', function ($matches) use ($delim, $eol) { |
|
| 67 | + return preg_replace_callback('/([\'"])(.*)\1/imsU', function($matches) use ($delim, $eol) { |
|
| 68 | 68 | $ret = preg_replace("/({$eol})/", static::PLACEHOLDER_NEWLINE, $matches[0]); |
| 69 | 69 | if (!is_null($delim)) { |
| 70 | 70 | $ret = str_replace($delim, static::PLACEHOLDER_DELIM, $ret); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | return s($this->replaceQuotedSpecialChars($line, $delimiter)); |
| 41 | 41 | }); |
| 42 | 42 | $header = collect($lines->shift()->split($delimiter)) |
| 43 | - ->map(function($val){ return $this->unQuote($val); }) |
|
| 43 | + ->map(function($val) { return $this->unQuote($val); }) |
|
| 44 | 44 | ->map(function($val) { |
| 45 | 45 | return [ |
| 46 | 46 | 'type' => $this->getType($val), |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | $d = $this->getDialect(); |
| 143 | 143 | $fields = collect(s($line) |
| 144 | 144 | ->trimRight($d->getLineTerminator()) |
| 145 | - ->split($d->getDelimiter() . "(?=([^\"]*\"[^\"]*\")*[^\"]*$)")); |
|
| 145 | + ->split($d->getDelimiter()."(?=([^\"]*\"[^\"]*\")*[^\"]*$)")); |
|
| 146 | 146 | if (!is_null($this->header)) { |
| 147 | 147 | $fields = $fields->rekey($this->header); |
| 148 | 148 | } |