Renamed InvalidShortCodeException to ShortCodeNotFoundException

This commit is contained in:
Alejandro Celaya
2019-11-24 23:11:25 +01:00
parent cdd36b6712
commit 2f1de4a162
24 changed files with 58 additions and 47 deletions

View File

@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Core\Exception;
use DomainException as SplDomainException;
class DomainException extends SplDomainException implements ExceptionInterface
{
}

View File

@@ -10,11 +10,11 @@ use Zend\ProblemDetails\Exception\ProblemDetailsExceptionInterface;
use function sprintf;
class InvalidShortCodeException extends RuntimeException implements ProblemDetailsExceptionInterface
class ShortUrlNotFoundException extends DomainException implements ProblemDetailsExceptionInterface
{
use CommonProblemDetailsExceptionTrait;
private const TITLE = 'Invalid short code';
private const TITLE = 'Short URL not found';
public const TYPE = 'INVALID_SHORTCODE';
public static function fromNotFoundShortCode(string $shortCode): self