Skip to content

Commit 59c0871

Browse files
authored
feat: time() replaced with now() (#36)
1 parent f3c2f2f commit 59c0871

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/HistoryObserver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function created($model)
2222
'meta' => $model->getModelMeta('created'),
2323
'user_id' => static::getUserID(),
2424
'user_type' => static::getUserType(),
25-
'performed_at' => time(),
25+
'performed_at' => now(),
2626
]);
2727
}
2828

@@ -58,7 +58,7 @@ public function updating($model)
5858
'meta' => $meta,
5959
'user_id' => static::getUserID(),
6060
'user_type' => static::getUserType(),
61-
'performed_at' => time(),
61+
'performed_at' => now(),
6262
]);
6363
}
6464

@@ -77,7 +77,7 @@ public function deleting($model)
7777
'meta' => $model->getModelMeta('deleting'),
7878
'user_id' => static::getUserID(),
7979
'user_type' => static::getUserType(),
80-
'performed_at' => time(),
80+
'performed_at' => now(),
8181
]);
8282
}
8383

@@ -96,7 +96,7 @@ public function restored($model)
9696
'meta' => $model->getModelMeta('restored'),
9797
'user_id' => static::getUserID(),
9898
'user_type' => static::getUserType(),
99-
'performed_at' => time(),
99+
'performed_at' => now(),
100100
]);
101101
}
102102

src/Listeners/HistoryEventSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function onModelChanged($event)
2323
'meta' => $event->meta,
2424
'user_id' => HistoryObserver::getUserID(),
2525
'user_type' => HistoryObserver::getUserType(),
26-
'performed_at' => time(),
26+
'performed_at' => now(),
2727
]);
2828
}
2929

0 commit comments

Comments
 (0)