diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-03-26 17:11:56 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-03-26 17:11:56 +0000 |
| commit | 435c321caaf3ae7aca936f175348d9efb40d6419 (patch) | |
| tree | d64d45215fa331dca8c489e9b9fbbc9e04cb5eda /classes/TimeHelper.php | |
| parent | fea3089bde5b4abfdcc8b5a0314a7f82fcf25bea (diff) | |
| parent | de00a095387499cdb5c8eb9c0ab721d67bd0b3fa (diff) | |
Merge branch 'feature/php84-explicit-nullable-params' into 'master'
Make implicitly nullable parameters explicitly nullable.
See merge request tt-rss/tt-rss!26
Diffstat (limited to 'classes/TimeHelper.php')
| -rw-r--r-- | classes/TimeHelper.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/TimeHelper.php b/classes/TimeHelper.php index 453ee0cee..f1c437831 100644 --- a/classes/TimeHelper.php +++ b/classes/TimeHelper.php @@ -1,7 +1,7 @@ <?php class TimeHelper { - static function smart_date_time(int $timestamp, int $tz_offset = 0, int $owner_uid = null, bool $eta_min = false): string { + static function smart_date_time(int $timestamp, int $tz_offset = 0, ?int $owner_uid = null, bool $eta_min = false): string { if (!$owner_uid) $owner_uid = $_SESSION['uid']; if ($eta_min && time() + $tz_offset - $timestamp < 3600) { @@ -21,7 +21,7 @@ class TimeHelper { } } - static function make_local_datetime(?string $timestamp, bool $long, int $owner_uid = null, + static function make_local_datetime(?string $timestamp, bool $long, ?int $owner_uid = null, bool $no_smart_dt = false, bool $eta_min = false): string { if (!$owner_uid) $owner_uid = $_SESSION['uid']; |