From a4ddec290478384c06cf2b0d647d8157b4628ac5 Mon Sep 17 00:00:00 2001 From: Micha Vie Date: Tue, 24 Sep 2024 12:52:39 +0200 Subject: [PATCH] minor refactoring --- src/Address.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Address.php b/src/Address.php index 3e556b2..c867675 100644 --- a/src/Address.php +++ b/src/Address.php @@ -16,19 +16,16 @@ class Address const BECH32_ADDRESS_LENGTH = 62; const PUBKEY_LENGTH = 32; - public readonly string $hrp; - private function __construct( private string $valueHex, - string $hrp = self::DEFAULT_HRP + public readonly string $hrp = self::DEFAULT_HRP ) { - $this->hrp = $hrp; } public static function newFromHex(string $value, string $hrp = self::DEFAULT_HRP): Address { if (! self::isValidHex($value)) { - throw new InvalidArgumentException('Invalid hex value'); + throw new InvalidArgumentException('invalid hex value'); } return new Address(