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

Commit 49efe9a

Browse filesBrowse files
[Uid] remove Uuid::getVariant()
1 parent cc73b1e commit 49efe9a
Copy full SHA for 49efe9a

2 files changed

-11Lines changed: 0 additions & 11 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Symfony/Component/Uid/Tests/UuidTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Uid/Tests/UuidTest.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ public function testExtraMethods()
132132
{
133133
$uuid = new Uuid(self::A_UUID_V1);
134134

135-
$this->assertSame(Uuid::VARIANT_DCE, $uuid->getVariant());
136135
$this->assertSame(1583245966.746458, $uuid->getTime());
137136
$this->assertSame('3499710062d0', $uuid->getMac());
138137
$this->assertSame(self::A_UUID_V1, (string) $uuid);
Collapse file

‎src/Symfony/Component/Uid/Uuid.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Uid/Uuid.php
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ class Uuid implements \JsonSerializable
2323
public const TYPE_4 = UUID_TYPE_RANDOM;
2424
public const TYPE_5 = UUID_TYPE_SHA1;
2525

26-
public const VARIANT_NCS = UUID_VARIANT_NCS;
27-
public const VARIANT_DCE = UUID_VARIANT_DCE;
28-
public const VARIANT_MICROSOFT = UUID_VARIANT_MICROSOFT;
29-
public const VARIANT_OTHER = UUID_VARIANT_OTHER;
30-
3126
// https://tools.ietf.org/html/rfc4122#section-4.1.4
3227
// 0x01b21dd213814000 is the number of 100-ns intervals between the
3328
// UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00.
@@ -113,11 +108,6 @@ public function getType(): int
113108
return uuid_type($this->uuid);
114109
}
115110

116-
public function getVariant(): int
117-
{
118-
return uuid_variant($this->uuid);
119-
}
120-
121111
public function getTime(): float
122112
{
123113
if (self::TYPE_1 !== $t = uuid_type($this->uuid)) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.