From decc37d61204b931058e8e8aad2f9824746ad463 Mon Sep 17 00:00:00 2001 From: Zan Baldwin Date: Sat, 17 Oct 2026 13:06:22 +0200 Subject: [PATCH] =?UTF-8?q?test:=20=F0=9F=9A=A8=20remove=20unused=20variab?= =?UTF-8?q?le=20assignments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Util/MbStringTest.php | 6 +++--- tests/Version/IPv6Test.php | 4 ++-- tests/Version/MultiTest.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Util/MbStringTest.php b/tests/Util/MbStringTest.php index a6127fa..cd7fcc1 100644 --- a/tests/Util/MbStringTest.php +++ b/tests/Util/MbStringTest.php @@ -80,9 +80,9 @@ public function testSubStringPreservesZeroByte(): void #[PHPUnit\Test] public function testPadStringAscii(): void { - $this->assertSame('-0--Hello', $result = MbString::padString('Hello', 9, '-0-', STR_PAD_LEFT)); - $this->assertSame('Hello-0--', $result = MbString::padString('Hello', 9, '-0-', STR_PAD_RIGHT)); - $this->assertSame('-0Hello-0', $result = MbString::padString('Hello', 9, '-0-', STR_PAD_BOTH)); + $this->assertSame('-0--Hello', MbString::padString('Hello', 9, '-0-', STR_PAD_LEFT)); + $this->assertSame('Hello-0--', MbString::padString('Hello', 9, '-0-', STR_PAD_RIGHT)); + $this->assertSame('-0Hello-0', MbString::padString('Hello', 9, '-0-', STR_PAD_BOTH)); } /** @test */ diff --git a/tests/Version/IPv6Test.php b/tests/Version/IPv6Test.php index d9707d6..1f4a2b5 100644 --- a/tests/Version/IPv6Test.php +++ b/tests/Version/IPv6Test.php @@ -116,7 +116,7 @@ public function testExceptionIsThrownOnInstantiationWithInvalidAddresses(string $this->expectException(\Darsyn\IP\Exception\InvalidIpAddressException::class); $this->legacyExpectExceptionMessage('The IP address supplied is not valid.'); try { - $ip = IP::factory($value); + IP::factory($value); } catch (InvalidIpAddressException $e) { $this->assertSame($value, $e->getSuppliedIp()); throw $e; @@ -135,7 +135,7 @@ public function testExceptionIsThrownOnInstantiationWithInvalidAddresses(string public function testInstantiationFromEmbeddedIpAddress(): void { try { - $ip = IP::fromProtocol('12.34.56.78'); + IP::fromProtocol('12.34.56.78'); $this->fail('IPv6 fromProtocol() should not accept IPv4 addresses.'); } catch (InvalidIpAddressException $e) { } diff --git a/tests/Version/MultiTest.php b/tests/Version/MultiTest.php index f4047fc..af887df 100644 --- a/tests/Version/MultiTest.php +++ b/tests/Version/MultiTest.php @@ -157,7 +157,7 @@ public function testExceptionIsThrownOnInstantiationWithInvalidAddresses(string $this->expectException(InvalidIpAddressException::class); $this->legacyExpectExceptionMessage('The IP address supplied is not valid.'); try { - $ip = IP::factory($value); + IP::factory($value); } catch (InvalidIpAddressException $e) { $this->assertSame($value, $e->getSuppliedIp()); throw $e;