summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Reader.php3
-rw-r--r--src/Writer.php4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Reader.php b/src/Reader.php
index 1f2d65e..64f7238 100644
--- a/src/Reader.php
+++ b/src/Reader.php
@@ -164,6 +164,7 @@ class Reader extends AbstractCsv
*
* @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 @@ class Reader extends AbstractCsv
*
* @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 fd9a359..a25e29f 100644
--- a/src/Writer.php
+++ b/src/Writer.php
@@ -140,12 +140,12 @@ class Writer extends AbstractCsv
*/
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;
}
/**