From 34285664e6d22ac93be496d8f0fbed160337b00c Mon Sep 17 00:00:00 2001 From: Ignace Nyamagana Butera Date: Tue, 5 May 2015 11:53:33 +0200 Subject: [PATCH] update package --- src/Reader.php | 3 ++- src/Writer.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Reader.php b/src/Reader.php index 1f2d65eb..64f72383 100644 --- a/src/Reader.php +++ b/src/Reader.php @@ -164,6 +164,7 @@ public function fetchColumn($column_index = 0, callable $callable = null) * * @param array|int $offset_or_keys the name for each key member OR the row Index to be * used as the associated named keys + * * @param callable $callable a callable function * * @throws \InvalidArgumentException If the submitted keys are invalid @@ -247,7 +248,7 @@ protected function getRow($offset) * * @param array $keys * - * @return boolean + * @throws \InvalidArgumentException If the submitted array fails the assertion */ protected function assertValidAssocKeys(array $keys) { diff --git a/src/Writer.php b/src/Writer.php index fd9a359e..a25e29f3 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -140,12 +140,12 @@ public function insertOne($row) */ protected function getFputcsvParameters(array $fields) { - $parameters = [$this->delimiter, $this->enclosure]; + $parameters = [$fields, $this->delimiter, $this->enclosure]; if (4 == static::$fputcsv_param_count) { $parameters[] = $this->escape; } - return array_merge([$fields], $parameters); + return $parameters; } /**