Skip to content

Commit

Permalink
Merge pull request #2949 from briannesbitt/refactor/simplify-get-inst…
Browse files Browse the repository at this point in the history
…ance

Simplify FactoryImmutable::getInstance
  • Loading branch information
kylekatarnls authored Feb 17, 2024
2 parents 9703f87 + d7972ac commit a5831d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Carbon/FactoryImmutable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Carbon/Traits/Timestamp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit a5831d2

Please sign in to comment.