Skip to content

Commit

Permalink
Fix invalid export callable arguments in DateTimeColumnType #145
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreyu authored Nov 19, 2024
1 parent 6801883 commit 22be172
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Column/Type/DateTimeColumnType.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function configureOptions(OptionsResolver $resolver): void

if (is_array($value)) {
$value += [
'formatter' => static function (mixed $dateTime, ColumnInterface $column): string {
if ($dateTime instanceof \DateTimeInterface) {
return $dateTime->format($column->getConfig()->getOption('format'));
'formatter' => static function (mixed $value, mixed $data, ColumnInterface $column): string {
if ($value instanceof \DateTimeInterface) {
return $value->format($column->getConfig()->getOption('format'));
}

return '';
Expand Down

0 comments on commit 22be172

Please sign in to comment.