Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Uid] remove Uuid::getVariant()
  • Loading branch information
nicolas-grekas committed Mar 13, 2020
commit 49efe9a5a9386b0563e54a4869c1d0a3cf7aac43
1 change: 0 additions & 1 deletion 1 src/Symfony/Component/Uid/Tests/UuidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public function testExtraMethods()
{
$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);
Expand Down
10 changes: 0 additions & 10 deletions 10 src/Symfony/Component/Uid/Uuid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -113,11 +108,6 @@ public function getType(): int
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)) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.