diff --git a/src/String/Url.php b/src/String/Url.php index 526b0ff..ea95889 100644 --- a/src/String/Url.php +++ b/src/String/Url.php @@ -4,17 +4,14 @@ namespace Epignosis\Types\String; -use Epignosis\Types\AbstractType; use InvalidArgumentException; use const FILTER_NULL_ON_FAILURE; use const FILTER_SANITIZE_URL; use const FILTER_VALIDATE_URL; -class Url extends AbstractType +class Url extends NonEmptyString { - private string $value; - public function __construct(string $value) { /** @var string|null $value */ @@ -24,11 +21,6 @@ public function __construct(string $value) throw new InvalidArgumentException('Url is invalid'); } - $this->value = $value; - } - - final public function getValue(): string - { - return $this->value; + parent::__construct($value); } }