Skip to content

Commit b2a7580

Browse files
committed
Fix typo
1 parent 1a488b1 commit b2a7580

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Traits/ExcelExportable.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,13 @@ private static function dataGet($target, $key, $default = null)
376376
*
377377
* @param string $mappingKey The key of the mapped column that is being exported.
378378
* @param mixed $value The value that is being exported.
379+
* @param mixed $rowItem The current processing row item
379380
*
380381
* @return mixed The formatted value.
381382
*/
382-
protected function formatValue($mappingKey, $value)
383+
protected function formatValue($mappingKey, $value, $rowItem = null)
383384
{
384-
return $this->parentFormat($mappingKey, $value);
385+
return $this->parentFormat($mappingKey, $value, $rowItem);
385386
}
386387

387388
/**

src/Traits/HasExportAttributes.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ protected function formatValue($mappingKey, $value, $rowItem = null)
9090
}
9191
if (isset($this->formatters[$mappingKey])) {
9292
if(is_callable($this->formatters[$mappingKey])){
93-
return call_user_func_array($this->formatters[$mappingKey], [$value, $mappingKey, $rowItem]);
93+
94+
return call_user_func($this->formatters[$mappingKey], $value, $mappingKey, $rowItem);
9495
}
9596
return $this->formatters[$mappingKey];
9697
}

0 commit comments

Comments
 (0)