diff --git a/docs/nonstandard.rst b/docs/nonstandard.rst index aa0eb5f..9bae3e2 100644 --- a/docs/nonstandard.rst +++ b/docs/nonstandard.rst @@ -25,7 +25,7 @@ Version 6: Ordered-time :ref:`version 1 UUID ` with a *monotonically increasing* UUID. For more details, see :ref:`nonstandard.version6`. -GUID +Globally Unique Identifiers (GUIDs) A globally unique identifier, or GUID, is often used as a synonym for UUID. A key difference is the order of the bytes. Any `RFC 4122`_ version UUID may be represented as a GUID. For more details, see :ref:`nonstandard.guid`. diff --git a/docs/nonstandard/guid.rst b/docs/nonstandard/guid.rst index db99d90..3c9613f 100644 --- a/docs/nonstandard/guid.rst +++ b/docs/nonstandard/guid.rst @@ -1,8 +1,8 @@ .. _nonstandard.guid: -================================= -Globally Unique Identifier (GUID) -================================= +=================================== +Globally Unique Identifiers (GUIDs) +=================================== .. tip:: diff --git a/docs/quickstart.rst b/docs/quickstart.rst index e53fc1d..d964a73 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -104,6 +104,8 @@ library. * - :php:meth:`Uuid::fromInteger() ` - Creates a UUID instance from a string integer. * - :php:meth:`Uuid::fromDateTime() ` - - Creates a version 1 UUID instance from a PHP ``\DateTimeInterface``. + - Creates a version 1 UUID instance from a PHP `DateTimeInterface`_. + .. _RFC 4122: https://tools.ietf.org/html/rfc4122 +.. _DateTimeInterface: https://www.php.net/datetimeinterface diff --git a/docs/reference/exceptions.rst b/docs/reference/exceptions.rst index 7790053..29c3eaf 100644 --- a/docs/reference/exceptions.rst +++ b/docs/reference/exceptions.rst @@ -8,33 +8,33 @@ Exceptions .. php:exception:: BuilderNotFoundException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate that no suitable UUID builder could be found. .. php:exception:: DateTimeException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate that the PHP DateTime extension encountered an exception or error. .. php:exception:: DceSecurityException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate an exception occurred while dealing with DCE Security (version 2) UUIDs .. php:exception:: InvalidArgumentException - Extends ``\InvalidArgumentException``. + Extends `InvalidArgumentException `_. Thrown to indicate that the argument received is not valid. .. php:exception:: InvalidBytesException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate that the bytes being operated on are invalid in some way. @@ -46,38 +46,38 @@ Exceptions .. php:exception:: NameException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate that an error occurred while attempting to hash a namespace and name .. php:exception:: NodeException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate that attempting to fetch or create a node ID encountered an error. .. php:exception:: RandomSourceException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate that the source of random data encountered an error. .. php:exception:: TimeSourceException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate that the source of time encountered an error. .. php:exception:: UnableToBuildUuidException - Extends ``\RuntimeException``. + Extends `RuntimeException `_. Thrown to indicate a builder is unable to build a UUID. .. php:exception:: UnsupportedOperationException - Extends ``\LogicException``. + Extends `LogicException `_. Thrown to indicate that the requested operation is not supported. diff --git a/docs/reference/guid-fields.rst b/docs/reference/guid-fields.rst index 9b4b407..73ace97 100644 --- a/docs/reference/guid-fields.rst +++ b/docs/reference/guid-fields.rst @@ -10,4 +10,4 @@ Guid\\Fields Implements :php:interface:`Ramsey\\Uuid\\Rfc4122\\FieldsInterface`. - ``Guid\Fields`` represents the fields of a GUID. + Guid\Fields represents the fields of a GUID. diff --git a/docs/reference/rfc4122-fieldsinterface.rst b/docs/reference/rfc4122-fieldsinterface.rst index d5f34c9..44ec64d 100644 --- a/docs/reference/rfc4122-fieldsinterface.rst +++ b/docs/reference/rfc4122-fieldsinterface.rst @@ -10,7 +10,7 @@ Rfc4122\\FieldsInterface Implements :php:interface:`Ramsey\\Uuid\\Fields\\FieldsInterface`. - ``Rfc4122\FieldsInterface`` represents the fields of an RFC 4122 UUID. + Rfc4122\FieldsInterface represents the fields of an RFC 4122 UUID. In addition to the methods defined on the interface, this class additionally defines the following methods. diff --git a/docs/reference/rfc4122-uuidinterface.rst b/docs/reference/rfc4122-uuidinterface.rst index 5eb07bd..543d445 100644 --- a/docs/reference/rfc4122-uuidinterface.rst +++ b/docs/reference/rfc4122-uuidinterface.rst @@ -10,7 +10,7 @@ Rfc4122\\UuidInterface Implements :php:interface:`Ramsey\\Uuid\\UuidInterface`. - ``Rfc4122\UuidInterface`` represents an RFC 4122 UUID. In addition to the + Rfc4122\UuidInterface represents an RFC 4122 UUID. In addition to the methods defined on the interface, this interface additionally defines the following methods. diff --git a/docs/reference/rfc4122-uuidv2.rst b/docs/reference/rfc4122-uuidv2.rst index 2745de2..026cd62 100644 --- a/docs/reference/rfc4122-uuidv2.rst +++ b/docs/reference/rfc4122-uuidv2.rst @@ -16,8 +16,8 @@ Rfc4122\\UuidV2 .. php:method:: getDateTime() - Returns a DateTimeInterface object representing the timestamp associated - with the UUID + Returns a `DateTimeInterface `_ + instance representing the timestamp associated with the UUID .. caution:: diff --git a/docs/reference/types.rst b/docs/reference/types.rst index 2556ffc..a74dc6d 100644 --- a/docs/reference/types.rst +++ b/docs/reference/types.rst @@ -8,7 +8,8 @@ Types .. php:class:: TypeInterface - Implements ``\JsonSerializable`` and ``\Serializable``. + Implements `JsonSerializable `_ and + `Serializable `_. TypeInterface ensures consistency in typed values returned by ramsey/uuid. diff --git a/docs/reference/uuid.rst b/docs/reference/uuid.rst index baf5a73..a835208 100644 --- a/docs/reference/uuid.rst +++ b/docs/reference/uuid.rst @@ -4,7 +4,7 @@ Uuid ==== -``Ramsey\Uuid`` provides static methods for the most common functionality for +Ramsey\Uuid\Uuid provides static methods for the most common functionality for generating and working with UUIDs. It also provides constants used throughout the ramsey/uuid library. @@ -141,7 +141,7 @@ the ramsey/uuid library. .. php:staticmethod:: fromString($uuid) - Creates an instance of ``UuidInterface`` from the string standard + Creates an instance of UuidInterface from the string standard representation. :param string $uuid: The string standard representation of a UUID @@ -149,21 +149,22 @@ the ramsey/uuid library. .. php:staticmethod:: fromBytes($bytes) - Creates an instance of ``UuidInterface`` from a 16-byte string. + Creates an instance of UuidInterface from a 16-byte string. :param string $bytes: A 16-byte binary string representation of a UUID :returntype: Ramsey\\Uuid\\UuidInterface .. php:staticmethod:: fromInteger($integer) - Creates an instance of ``UuidInterface`` from a 128-bit string integer. + Creates an instance of UuidInterface from a 128-bit string integer. :param string $integer: A 128-bit string integer representation of a UUID :returntype: Ramsey\\Uuid\\UuidInterface .. php:staticmethod:: fromDateTime($dateTime[, $node[, $clockSeq]]) - Creates a version 1 UUID instance from a ``\DateTimeInterface`` instance. + Creates a version 1 UUID instance from a `DateTimeInterface + `_ instance. :param DateTimeInterface $dateTime: The date from which to create the UUID instance :param Ramsey\\Uuid\\Type\\Hexadecimal|null $node: An optional hexadecimal node to use diff --git a/docs/rfc4122/version2.rst b/docs/rfc4122/version2.rst index e1a1ca4..49e6612 100644 --- a/docs/rfc4122/version2.rst +++ b/docs/rfc4122/version2.rst @@ -249,8 +249,8 @@ that represents a local identifier. Because of this, not only do version 2 UUIDs have :ref:`limited uniqueness `, but they also lack time precision. -When reconstructing the timestamp to return a ``\DateTimeInterface`` instance -from :php:meth:`UuidV2::getDateTime() `, +When reconstructing the timestamp to return a `DateTimeInterface`_ instance from +:php:meth:`UuidV2::getDateTime() `, we replace the 32 lower bits of the timestamp with zeros, since the local identifier should not be part of the timestamp. This results in a loss of precision, causing the timestamp to be off by a range of 0 to 429.4967295 @@ -270,3 +270,4 @@ it could be off by about 7 minutes. .. _Distributed Computing Environment: https://en.wikipedia.org/wiki/Distributed_Computing_Environment .. _POSIX: https://en.wikipedia.org/wiki/POSIX +.. _DateTimeInterface: https://www.php.net/datetimeinterface