From d7972ac538c9206d2ac33aa1f49c1109c4590f90 Mon Sep 17 00:00:00 2001 From: kylekatarnls Date: Sat, 17 Feb 2024 14:58:28 +0100 Subject: [PATCH] Simplify FactoryImmutable::getInstance --- src/Carbon/FactoryImmutable.php | 2 +- src/Carbon/Traits/Timestamp.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Carbon/FactoryImmutable.php b/src/Carbon/FactoryImmutable.php index e695da6693..fbf8733256 100644 --- a/src/Carbon/FactoryImmutable.php +++ b/src/Carbon/FactoryImmutable.php @@ -148,7 +148,7 @@ public static function getDefaultInstance(): self */ public static function getInstance(): Factory { - return self::$currentClock?->getFactory() ?? self::$defaultInstance ??= new self(); + return self::$currentClock?->getFactory() ?? self::getDefaultInstance(); } /** diff --git a/src/Carbon/Traits/Timestamp.php b/src/Carbon/Traits/Timestamp.php index 0688ea7cb5..9e365f8a48 100644 --- a/src/Carbon/Traits/Timestamp.php +++ b/src/Carbon/Traits/Timestamp.php @@ -35,7 +35,7 @@ public static function createFromTimestamp( } /** - * Create a Carbon instance from an timestamp keeping the timezone to UTC. + * Create a Carbon instance from a timestamp keeping the timezone to UTC. * * Timestamp input can be given as int, float or a string containing one or more numbers. */