chore: update nomenclature

This commit is contained in:
Ben Ramsey
2022-09-12 20:56:42 -05:00
parent 7d1400b90a
commit 078feed166
9 changed files with 18 additions and 25 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ use Ramsey\Uuid\Rfc4122\UuidV6ConverterTrait;
use Ramsey\Uuid\Uuid;
/**
* Reordered-time, or version 6, UUIDs include timestamp, clock sequence, and
* Reordered time, or version 6, UUIDs include timestamp, clock sequence, and
* node values that are combined into a 128-bit unsigned integer
*
* @deprecated Use {@see \Ramsey\Uuid\Rfc4122\UuidV6} instead.
@@ -41,7 +41,7 @@ class UuidV6 extends Uuid implements UuidInterface
use UuidV6ConverterTrait;
/**
* Creates a version 6 (reordered-time) UUID
* Creates a version 6 (reordered time) UUID
*
* @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID
* @param NumberConverterInterface $numberConverter The number converter to use
@@ -60,7 +60,7 @@ class UuidV6 extends Uuid implements UuidInterface
if ($fields->getVersion() !== Uuid::UUID_TYPE_REORDERED_TIME) {
throw new InvalidArgumentException(
'Fields used to create a UuidV6 must represent a '
. 'version 6 (ordered-time) UUID'
. 'version 6 (reordered time) UUID'
);
}
+2 -1
View File
@@ -103,11 +103,12 @@ interface FieldsInterface extends BaseFieldsInterface
* The version number describes how the UUID was generated and has the
* following meaning:
*
* 1. Time-based UUID
* 1. Gregorian time UUID
* 2. DCE security UUID
* 3. Name-based UUID hashed with MD5
* 4. Randomly generated UUID
* 5. Name-based UUID hashed with SHA-1
* 6. Reordered time UUID
*
* This returns `null` if the UUID is not an RFC 4122 variant, since version
* is only meaningful for this variant.
+2 -2
View File
@@ -22,7 +22,7 @@ use Ramsey\Uuid\Rfc4122\FieldsInterface as Rfc4122FieldsInterface;
use Ramsey\Uuid\Uuid;
/**
* Time-based, or version 1, UUIDs include timestamp, clock sequence, and node
* Gregorian time, or version 1, UUIDs include timestamp, clock sequence, and node
* values that are combined into a 128-bit unsigned integer
*
* @psalm-immutable
@@ -32,7 +32,7 @@ final class UuidV1 extends Uuid implements UuidInterface
use TimeTrait;
/**
* Creates a version 1 (time-based) UUID
* Creates a version 1 (Gregorian time) UUID
*
* @param Rfc4122FieldsInterface $fields The fields from which to construct a UUID
* @param NumberConverterInterface $numberConverter The number converter to use
+1 -1
View File
@@ -17,7 +17,7 @@ namespace Ramsey\Uuid\Rfc4122;
use Ramsey\Uuid\Nonstandard\UuidV6 as NonstandardUuidV6;
/**
* Reordered-time, or version 6, UUIDs include timestamp, clock sequence, and
* Reordered time, or version 6, UUIDs include timestamp, clock sequence, and
* node values that are combined into a 128-bit unsigned integer
*
* @link https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04#section-5.1 UUID Version 6
+4 -12
View File
@@ -116,7 +116,7 @@ class Uuid implements UuidInterface
public const VALID_PATTERN = '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$';
/**
* Version 1 (time-based) UUID
* Version 1 (Gregorian time) UUID
*
* @link https://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version
*/
@@ -156,20 +156,12 @@ class Uuid implements UuidInterface
public const UUID_TYPE_HASH_SHA1 = 5;
/**
* Version 6 (reordered-time) UUID
*
* This is named `UUID_TYPE_PEABODY`, since the specification is still in
* draft form, and the primary author/editor's name is Brad Peabody.
*
* @deprecated Use {@see Uuid::UUID_TYPE_REORDERED_TIME} instead.
*
* @link https://github.com/uuid6/uuid6-ietf-draft UUID version 6 IETF draft
* @link http://gh.peabody.io/uuidv6/ "Version 6" UUIDs
*/
public const UUID_TYPE_PEABODY = 6;
/**
* Version 6 (reordered-time) UUID
* Version 6 (reordered time) UUID
*
* @link https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04#section-5.1 UUID Version 6
*/
@@ -555,7 +547,7 @@ class Uuid implements UuidInterface
}
/**
* Returns a version 1 (time-based) UUID from a host ID, sequence number,
* Returns a version 1 (Gregorian time) UUID from a host ID, sequence number,
* and the current time
*
* @param Hexadecimal|int|string|null $node A 48-bit number representing the
@@ -660,7 +652,7 @@ class Uuid implements UuidInterface
}
/**
* Returns a version 6 (ordered-time) UUID from a host ID, sequence number,
* Returns a version 6 (reordered time) UUID from a host ID, sequence number,
* and the current time
*
* @param Hexadecimal|null $node A 48-bit number representing the hardware
+2 -2
View File
@@ -88,7 +88,7 @@ interface UuidFactoryInterface
public function getValidator(): ValidatorInterface;
/**
* Returns a version 1 (time-based) UUID from a host ID, sequence number,
* Returns a version 1 (Gregorian time) UUID from a host ID, sequence number,
* and the current time
*
* @param Hexadecimal|int|string|null $node A 48-bit number representing the
@@ -166,7 +166,7 @@ interface UuidFactoryInterface
public function uuid5($ns, string $name): UuidInterface;
/**
* Returns a version 6 (ordered-time) UUID from a host ID, sequence number,
* Returns a version 6 (reordered time) UUID from a host ID, sequence number,
* and the current time
*
* @param Hexadecimal|null $node A 48-bit number representing the hardware
+2 -2
View File
@@ -19,7 +19,7 @@ use Ramsey\Uuid\Type\Hexadecimal;
use Ramsey\Uuid\Type\Integer as IntegerObject;
/**
* Returns a version 1 (time-based) UUID from a host ID, sequence number,
* Returns a version 1 (Gregorian time) UUID from a host ID, sequence number,
* and the current time
*
* @param Hexadecimal|int|string|null $node A 48-bit number representing the
@@ -106,7 +106,7 @@ function v5($ns, string $name): string
}
/**
* Returns a version 6 (ordered-time) UUID from a host ID, sequence number,
* Returns a version 6 (reordered time) UUID from a host ID, sequence number,
* and the current time
*
* @param Hexadecimal|null $node A 48-bit number representing the hardware
+1 -1
View File
@@ -37,7 +37,7 @@ class UuidV6Test extends TestCase
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage(
'Fields used to create a UuidV6 must represent a '
. 'version 6 (ordered-time) UUID'
. 'version 6 (reordered time) UUID'
);
new UuidV6($fields, $numberConverter, $codec, $timeConverter);
+1 -1
View File
@@ -37,7 +37,7 @@ class UuidV6Test extends TestCase
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage(
'Fields used to create a UuidV6 must represent a '
. 'version 6 (ordered-time) UUID'
. 'version 6 (reordered time) UUID'
);
new UuidV6($fields, $numberConverter, $codec, $timeConverter);