Skip to content

Commit

Permalink
feat: time() replaced with now() (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirePetrov authored Mar 22, 2024
1 parent f3c2f2f commit 59c0871
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/HistoryObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function created($model)
'meta' => $model->getModelMeta('created'),
'user_id' => static::getUserID(),
'user_type' => static::getUserType(),
'performed_at' => time(),
'performed_at' => now(),
]);
}

Expand Down Expand Up @@ -58,7 +58,7 @@ public function updating($model)
'meta' => $meta,
'user_id' => static::getUserID(),
'user_type' => static::getUserType(),
'performed_at' => time(),
'performed_at' => now(),
]);
}

Expand All @@ -77,7 +77,7 @@ public function deleting($model)
'meta' => $model->getModelMeta('deleting'),
'user_id' => static::getUserID(),
'user_type' => static::getUserType(),
'performed_at' => time(),
'performed_at' => now(),
]);
}

Expand All @@ -96,7 +96,7 @@ public function restored($model)
'meta' => $model->getModelMeta('restored'),
'user_id' => static::getUserID(),
'user_type' => static::getUserType(),
'performed_at' => time(),
'performed_at' => now(),
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/HistoryEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function onModelChanged($event)
'meta' => $event->meta,
'user_id' => HistoryObserver::getUserID(),
'user_type' => HistoryObserver::getUserType(),
'performed_at' => time(),
'performed_at' => now(),
]);
}

Expand Down

0 comments on commit 59c0871

Please sign in to comment.