Convert some constants to enums

This commit is contained in:
Alex Cabal 2024-01-14 22:32:47 -06:00
parent 793d832e92
commit 531e3600ea
14 changed files with 93 additions and 248 deletions

View file

@ -6,6 +6,6 @@ class ArtworkImageDimensionsTooSmallException extends AppException{
// This has to be initialized in a constructor because we use the number_format() function.
public function __construct(){
$this->message = 'Image dimensions are too small. The minimum image size is ' . number_format(COVER_ARTWORK_IMAGE_MINIMUM_WIDTH) . ' × ' . number_format(COVER_ARTWORK_IMAGE_MINIMUM_HEIGHT) . '.';
$this->message = 'Image dimensions are too small. The minimum image size is ' . number_format(ARTWORK_IMAGE_MINIMUM_WIDTH) . ' × ' . number_format(ARTWORK_IMAGE_MINIMUM_HEIGHT) . '.';
}
}

View file

@ -2,5 +2,5 @@
namespace Exceptions;
class TooManyTagsException extends AppException{
protected $message = 'Too many tags; the maximum is ' . COVER_ARTWORK_MAX_TAGS . '.';
protected $message = 'Too many tags; the maximum is ' . ARTWORK_MAX_TAGS . '.';
}