Skip to content

Commit

Permalink
[Uid][Serializer][Validator] Mention RFC 9562
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyweb committed Sep 11, 2024
1 parent 886c174 commit b36c894
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion AbstractUid.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public static function fromBase32(string $uid): self
}

/**
* @param string $uid A valid RFC 9562/4122 uid
*
* @return static
*
* @throws \InvalidArgumentException When the passed value is not valid
Expand Down Expand Up @@ -124,7 +126,7 @@ public function toBase32(): string
}

/**
* Returns the identifier as a RFC4122 case insensitive string.
* Returns the identifier as a RFC 9562/4122 case insensitive string.
*/
public function toRfc4122(): string
{
Expand Down
2 changes: 1 addition & 1 deletion BinaryUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class BinaryUtil
'u' => 52, 'v' => 53, 'w' => 54, 'x' => 55, 'y' => 56, 'z' => 57,
];

// https://tools.ietf.org/html/rfc4122#section-4.1.4
// https://datatracker.ietf.org/doc/html/rfc9562#section-5.1
// 0x01b21dd213814000 is the number of 100-ns intervals between the
// UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00.
private const TIME_OFFSET_INT = 0x01B21DD213814000;
Expand Down
2 changes: 1 addition & 1 deletion Uuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Grégoire Pineau <lyrixx@lyrixx.info>
*
* @see https://tools.ietf.org/html/rfc4122#appendix-C for details about namespaces
* @see https://datatracker.ietf.org/doc/html/rfc9562/#section-6.6 for details about namespaces
*/
class Uuid extends AbstractUid
{
Expand Down

0 comments on commit b36c894

Please sign in to comment.