mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Make it impossible to create a short URL with an empty long URL
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user