[Uid] remove Uuid::getVariant()

This commit is contained in:
Nicolas Grekas 2020-03-13 20:12:33 +01:00
parent cc73b1eafa
commit 49efe9a5a9
2 changed files with 0 additions and 11 deletions

View File

@ -132,7 +132,6 @@ class UuidTest extends TestCase
{
$uuid = new Uuid(self::A_UUID_V1);
$this->assertSame(Uuid::VARIANT_DCE, $uuid->getVariant());
$this->assertSame(1583245966.746458, $uuid->getTime());
$this->assertSame('3499710062d0', $uuid->getMac());
$this->assertSame(self::A_UUID_V1, (string) $uuid);

View File

@ -23,11 +23,6 @@ class Uuid implements \JsonSerializable
public const TYPE_4 = UUID_TYPE_RANDOM;
public const TYPE_5 = UUID_TYPE_SHA1;
public const VARIANT_NCS = UUID_VARIANT_NCS;
public const VARIANT_DCE = UUID_VARIANT_DCE;
public const VARIANT_MICROSOFT = UUID_VARIANT_MICROSOFT;
public const VARIANT_OTHER = UUID_VARIANT_OTHER;
// https://tools.ietf.org/html/rfc4122#section-4.1.4
// 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.
@ -113,11 +108,6 @@ class Uuid implements \JsonSerializable
return uuid_type($this->uuid);
}
public function getVariant(): int
{
return uuid_variant($this->uuid);
}
public function getTime(): float
{
if (self::TYPE_1 !== $t = uuid_type($this->uuid)) {