Skip to content

Commit

Permalink
Url should extend NonEmptyString
Browse files Browse the repository at this point in the history
  • Loading branch information
yrizos committed Jan 21, 2025
1 parent 670da53 commit 828e766
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/String/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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);
}
}

0 comments on commit 828e766

Please sign in to comment.