From 6f4bce22887d1a6831d6ed51b767f7aea572a3fb Mon Sep 17 00:00:00 2001 From: Kire Petrov Date: Wed, 20 Mar 2024 21:56:04 +0100 Subject: [PATCH] feat: time() replaced with now() --- src/HistoryObserver.php | 8 ++++---- src/Listeners/HistoryEventSubscriber.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/HistoryObserver.php b/src/HistoryObserver.php index af4b1c2..4c4852e 100644 --- a/src/HistoryObserver.php +++ b/src/HistoryObserver.php @@ -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(), ]); } @@ -58,7 +58,7 @@ public function updating($model) 'meta' => $meta, 'user_id' => static::getUserID(), 'user_type' => static::getUserType(), - 'performed_at' => time(), + 'performed_at' => now(), ]); } @@ -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(), ]); } @@ -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(), ]); } diff --git a/src/Listeners/HistoryEventSubscriber.php b/src/Listeners/HistoryEventSubscriber.php index 5e91e20..9b8109e 100644 --- a/src/Listeners/HistoryEventSubscriber.php +++ b/src/Listeners/HistoryEventSubscriber.php @@ -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(), ]); }