From cbb6d233a1baa491c622a29522e885a676125dd5 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Sat, 14 Mar 2020 17:40:57 +0100 Subject: [PATCH] [UID] Rename NullUuid to NilUuid --- src/Symfony/Component/Uid/{NullUuid.php => NilUuid.php} | 2 +- src/Symfony/Component/Uid/Tests/UuidTest.php | 6 +++--- src/Symfony/Component/Uid/Uuid.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/Symfony/Component/Uid/{NullUuid.php => NilUuid.php} (94%) diff --git a/src/Symfony/Component/Uid/NullUuid.php b/src/Symfony/Component/Uid/NilUuid.php similarity index 94% rename from src/Symfony/Component/Uid/NullUuid.php rename to src/Symfony/Component/Uid/NilUuid.php index 308b4efad0..c7614e46c9 100644 --- a/src/Symfony/Component/Uid/NullUuid.php +++ b/src/Symfony/Component/Uid/NilUuid.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Uid; * * @author Grégoire Pineau */ -class NullUuid extends Uuid +class NilUuid extends Uuid { protected const TYPE = UUID_TYPE_NULL; diff --git a/src/Symfony/Component/Uid/Tests/UuidTest.php b/src/Symfony/Component/Uid/Tests/UuidTest.php index 418bf39693..f6e8bf1bb0 100644 --- a/src/Symfony/Component/Uid/Tests/UuidTest.php +++ b/src/Symfony/Component/Uid/Tests/UuidTest.php @@ -12,7 +12,7 @@ namespace Symfony\Tests\Component\Uid; use PHPUnit\Framework\TestCase; -use Symfony\Component\Uid\NullUuid; +use Symfony\Component\Uid\NilUuid; use Symfony\Component\Uid\Uuid; use Symfony\Component\Uid\UuidV1; use Symfony\Component\Uid\UuidV3; @@ -146,11 +146,11 @@ class UuidTest extends TestCase $this->assertSame([$a, $b, $c, $d], $uuids); } - public function testNullUuid() + public function testNilUuid() { $uuid = Uuid::fromString('00000000-0000-0000-0000-000000000000'); - $this->assertInstanceOf(NullUuid::class, $uuid); + $this->assertInstanceOf(NilUuid::class, $uuid); $this->assertSame('00000000-0000-0000-0000-000000000000', (string) $uuid); } } diff --git a/src/Symfony/Component/Uid/Uuid.php b/src/Symfony/Component/Uid/Uuid.php index c280b26aa9..f96a0e4d94 100644 --- a/src/Symfony/Component/Uid/Uuid.php +++ b/src/Symfony/Component/Uid/Uuid.php @@ -50,7 +50,7 @@ class Uuid implements \JsonSerializable case UuidV4::TYPE: return new UuidV4($uuid); case UuidV5::TYPE: return new UuidV5($uuid); case UuidV6::TYPE: return new UuidV6($uuid); - case NullUuid::TYPE: return new NullUuid(); + case NilUuid::TYPE: return new NilUuid(); case self::TYPE: return new self($uuid); }