Modernize Domain entity

This commit is contained in:
Alejandro Celaya 2024-03-18 18:15:05 +01:00
parent 98992c656f
commit ab8fa52ca4

View file

@ -11,12 +11,12 @@ use Shlinkio\Shlink\Core\Config\NotFoundRedirects;
class Domain extends AbstractEntity implements JsonSerializable, NotFoundRedirectConfigInterface
{
private ?string $baseUrlRedirect = null;
private ?string $regular404Redirect = null;
private ?string $invalidShortUrlRedirect = null;
private function __construct(public readonly string $authority)
{
private function __construct(
public readonly string $authority,
private ?string $baseUrlRedirect = null,
private ?string $regular404Redirect = null,
private ?string $invalidShortUrlRedirect = null,
) {
}
public static function withAuthority(string $authority): self