diff options
Diffstat (limited to 'vendor/ramsey/uuid/src/UuidFactory.php')
| -rw-r--r-- | vendor/ramsey/uuid/src/UuidFactory.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/ramsey/uuid/src/UuidFactory.php b/vendor/ramsey/uuid/src/UuidFactory.php index 77d2383c3a..99644d4b48 100644 --- a/vendor/ramsey/uuid/src/UuidFactory.php +++ b/vendor/ramsey/uuid/src/UuidFactory.php @@ -180,17 +180,26 @@ class UuidFactory implements UuidFactoryInterface $this->uuidBuilder = $builder; } + /** + * @inheritdoc + */ public function fromBytes($bytes) { return $this->codec->decodeBytes($bytes); } + /** + * @inheritdoc + */ public function fromString($uuid) { $uuid = strtolower($uuid); return $this->codec->decode($uuid); } + /** + * @inheritdoc + */ public function fromInteger($integer) { $hex = $this->numberConverter->toHex($integer); @@ -199,6 +208,9 @@ class UuidFactory implements UuidFactoryInterface return $this->fromString($hex); } + /** + * @inheritdoc + */ public function uuid1($node = null, $clockSeq = null) { $bytes = $this->timeGenerator->generate($node, $clockSeq); @@ -207,11 +219,17 @@ class UuidFactory implements UuidFactoryInterface return $this->uuidFromHashedName($hex, 1); } + /** + * @inheritdoc + */ public function uuid3($ns, $name) { return $this->uuidFromNsAndName($ns, $name, 3, 'md5'); } + /** + * @inheritdoc + */ public function uuid4() { $bytes = $this->randomGenerator->generate(16); @@ -224,6 +242,9 @@ class UuidFactory implements UuidFactoryInterface return $this->uuidFromHashedName($hex, 4); } + /** + * @inheritdoc + */ public function uuid5($ns, $name) { return $this->uuidFromNsAndName($ns, $name, 5, 'sha1'); @@ -253,6 +274,7 @@ class UuidFactory implements UuidFactoryInterface * @param string $hashFunction The hash function to use when hashing together * the namespace and name * @return UuidInterface + * @throws \Ramsey\Uuid\Exception\InvalidUuidStringException */ protected function uuidFromNsAndName($ns, $name, $version, $hashFunction) { |
