Make it impossible to create a short URL with an empty long URL

This commit is contained in:
Alejandro Celaya
2023-01-22 11:27:16 +01:00
parent 13e443880a
commit 39adef8ab8
25 changed files with 49 additions and 61 deletions

View File

@@ -62,12 +62,9 @@ class ShortUrl extends AbstractEntity
{
}
/**
* @deprecated This should not be allowed
*/
public static function createEmpty(): self
public static function createFake(): self
{
return self::create(ShortUrlCreation::createEmpty());
return self::withLongUrl('foo');
}
/**

View File

@@ -43,14 +43,6 @@ final class ShortUrlCreation implements TitleResolutionModelInterface
) {
}
/**
* @deprecated This should not be allowed
*/
public static function createEmpty(): self
{
return new self('');
}
/**
* @throws ValidationException
*/