Add a Type enum to Tags for artwork/ebook

This commit is contained in:
Mike Colagrosso 2024-06-25 18:25:31 -06:00 committed by Alex Cabal
parent ee29c526f8
commit 402dae95ff
7 changed files with 62 additions and 10 deletions

View file

@ -0,0 +1,15 @@
<?
namespace Exceptions;
class InvalidArtworkTagTypeException extends AppException{
/** @var string $message */
protected $message = 'Type should be `artwork`.';
public function __construct(?string $tagType){
if($tagType !== null && trim($tagType) != ''){
$this->message .= ' Type provided: ' . $tagType;
}
parent::__construct($this->message);
}
}

View file

@ -0,0 +1,15 @@
<?
namespace Exceptions;
class InvalidEbookTagTypeException extends AppException{
/** @var string $message */
protected $message = 'Type should be `ebook`.';
public function __construct(?string $tagType){
if($tagType !== null && trim($tagType) != ''){
$this->message .= ' Type provided: ' . $tagType;
}
parent::__construct($this->message);
}
}