Fix PHPStan errors

This commit is contained in:
Mike Colagrosso 2024-05-20 20:37:25 -06:00 committed by Alex Cabal
parent 79daa82bf4
commit 72d679a04f
12 changed files with 53 additions and 0 deletions

View file

@ -4,8 +4,12 @@ namespace Exceptions;
use Safe\DateTimeImmutable;
class InvalidEbookUpdatedDatetimeException extends AppException{
/** @var string $message */
protected $message = 'Invalid EbookUpdated datetime.';
/**
* @throws \Exception
*/
public function __construct(DateTimeImmutable $updatedDatetime){
$now = new DateTimeImmutable();
$this->message = 'Invalid EbookUpdated datetime. ' . $updatedDatetime->format('Y-m-d') . ' is not between ' . EBOOK_EARLIEST_CREATION_DATE->format('Y-m-d') . ' and ' . $now->format('Y-m-d') . '.';