summaryrefslogtreecommitdiff
path: root/app/Factories/TimestampFactory.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Factories/TimestampFactory.php')
-rw-r--r--app/Factories/TimestampFactory.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Factories/TimestampFactory.php b/app/Factories/TimestampFactory.php
index 46c4086e1a..46b97ea2e2 100644
--- a/app/Factories/TimestampFactory.php
+++ b/app/Factories/TimestampFactory.php
@@ -43,7 +43,7 @@ class TimestampFactory implements TimestampFactoryInterface
*
* @return TimestampInterface
*/
- public function make(int $timestamp, UserInterface $user = null): TimestampInterface
+ public function make(int $timestamp, UserInterface|null $user = null): TimestampInterface
{
$user ??= Auth::user();
$timezone = $user->getPreference(UserInterface::PREF_TIME_ZONE, Site::getPreference('TIMEZONE'));
@@ -59,7 +59,7 @@ class TimestampFactory implements TimestampFactoryInterface
*
* @return TimestampInterface
*/
- public function fromString(?string $string, string $format = 'Y-m-d H:i:s', UserInterface $user = null): TimestampInterface
+ public function fromString(?string $string, string $format = 'Y-m-d H:i:s', UserInterface|null $user = null): TimestampInterface
{
$string ??= date($format);
$timestamp = date_create_from_format($format, $string);
@@ -76,7 +76,7 @@ class TimestampFactory implements TimestampFactoryInterface
*
* @return TimestampInterface
*/
- public function now(UserInterface $user = null): TimestampInterface
+ public function now(UserInterface|null $user = null): TimestampInterface
{
return $this->make(time(), $user);
}