diff options
Diffstat (limited to 'vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php')
-rw-r--r-- | vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php b/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php index 526c8ff46..b8bfd7215 100644 --- a/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php +++ b/vendor/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php @@ -19,15 +19,21 @@ use Ramsey\Uuid\Type\Integer as IntegerObject; use Ramsey\Uuid\Type\Time; /** - * FixedTimeProvider uses a known time to provide the time + * FixedTimeProvider uses an known time to provide the time * * This provider allows the use of a previously-generated, or known, time * when generating time-based UUIDs. */ class FixedTimeProvider implements TimeProviderInterface { - public function __construct(private Time $time) + /** + * @var Time + */ + private $fixedTime; + + public function __construct(Time $time) { + $this->fixedTime = $time; } /** @@ -37,7 +43,7 @@ class FixedTimeProvider implements TimeProviderInterface */ public function setUsec($value): void { - $this->time = new Time($this->time->getSeconds(), $value); + $this->fixedTime = new Time($this->fixedTime->getSeconds(), $value); } /** @@ -47,11 +53,11 @@ class FixedTimeProvider implements TimeProviderInterface */ public function setSec($value): void { - $this->time = new Time($value, $this->time->getMicroseconds()); + $this->fixedTime = new Time($value, $this->fixedTime->getMicroseconds()); } public function getTime(): Time { - return $this->time; + return $this->fixedTime; } } |