Skip to content

Commit 7919dae

Browse files
kenjisMGatner
andauthored
refactor: remove intermediate variable
Co-authored-by: MGatner <[email protected]>
1 parent 0faae06 commit 7919dae

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

system/Helpers/date_helper.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ function now(?string $timezone = null): int
2727
$timezone = empty($timezone) ? app_timezone() : $timezone;
2828

2929
if ($timezone === 'local' || $timezone === date_default_timezone_get()) {
30-
$time = Time::now();
31-
32-
return $time->getTimestamp();
30+
return Time::now()->getTimestamp();
3331
}
3432

3533
$time = Time::now($timezone);

0 commit comments

Comments
 (0)