diff --git a/CHANGELOG.md b/CHANGELOG.md index c2d7545b..b1ac72b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ All Notable changes to `Csv` will be documented in this file ### Fixed -- Nothing +- bug fix issue [#358](https://github.com/thephpleague/csv/pull/358) with the escape mechanism polyfill fixed by [on2](https://github.com/on2) ### Removed diff --git a/src/Polyfill/EmptyEscapeParser.php b/src/Polyfill/EmptyEscapeParser.php index 37016031..c479aba3 100644 --- a/src/Polyfill/EmptyEscapeParser.php +++ b/src/Polyfill/EmptyEscapeParser.php @@ -67,7 +67,7 @@ final class EmptyEscapeParser private static $trim_mask; /** - * @var string|bool + * @var string|false */ private static $line; diff --git a/src/Stream.php b/src/Stream.php index e3b5d8de..ce210496 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -305,7 +305,7 @@ public function setFlags(int $flags) * * @see http://php.net/manual/en/splfileobject.fputcsv.php * - * @return int|bool + * @return int|false */ public function fputcsv(array $fields, string $delimiter = ',', string $enclosure = '"', string $escape = '\\') { @@ -393,7 +393,7 @@ public function current() /** * Retrieves the current line as a CSV Record. * - * @return array|bool + * @return array|false */ protected function getCurrentRecord() { @@ -492,7 +492,7 @@ public function fseek(int $offset, int $whence = SEEK_SET) * * @see http://php.net/manual/en/splfileobject.fwrite.php * - * @return int|bool + * @return int|false */ public function fwrite(string $str, int $length = null) { diff --git a/src/Writer.php b/src/Writer.php index 59eafe81..8d5a2ed3 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -170,7 +170,7 @@ public function insertOne(array $record): int * * @see https://php.net/manual/en/function.fputcsv.php * - * @return int|bool + * @return int|false */ protected function addRecord(array $record) { @@ -204,7 +204,7 @@ protected function addRecord(array $record) * * The LF character is added at the end of each record to mimic fputcsv behavior * - * @return int|bool + * @return int|false */ protected function addRFC4180CompliantRecord(array $record) {