mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-15 16:07:55 +03:00
Change getDateTime to DateTimeInterface
This commit is contained in:
committed by
Ben Ramsey
parent
5f2eaa6d2d
commit
650cb9f545
@@ -14,7 +14,7 @@
|
||||
|
||||
namespace Ramsey\Uuid;
|
||||
|
||||
use DateTime;
|
||||
use DateTimeInterface;
|
||||
use JsonSerializable;
|
||||
use Ramsey\Uuid\Converter\NumberConverterInterface;
|
||||
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
|
||||
@@ -118,14 +118,14 @@ interface UuidInterface extends JsonSerializable, Serializable
|
||||
public function getClockSequenceHex();
|
||||
|
||||
/**
|
||||
* Returns a PHP `DateTime` object representing the timestamp associated
|
||||
* with this UUID.
|
||||
* Returns a PHP object that implements `DateTimeInterface` representing
|
||||
* the timestamp associated with this UUID.
|
||||
*
|
||||
* The timestamp value is only meaningful in a time-based UUID, which
|
||||
* has version type 1. If this UUID is not a time-based UUID then
|
||||
* this method throws `UnsupportedOperationException`.
|
||||
*
|
||||
* @return DateTime A PHP DateTime representation of the date
|
||||
* @return DateTimeInterface A PHP DateTimeImmutable representation of the date
|
||||
* @throws UnsupportedOperationException If this UUID is not a version 1 UUID
|
||||
* @throws UnsatisfiedDependencyException if called in a 32-bit system and
|
||||
* `Moontoast\Math\BigNumber` is not present
|
||||
|
||||
Reference in New Issue
Block a user