mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Fix PHPStan errors
This commit is contained in:
parent
79daa82bf4
commit
72d679a04f
12 changed files with 53 additions and 0 deletions
|
@ -4,8 +4,12 @@ namespace Exceptions;
|
|||
use Safe\DateTimeImmutable;
|
||||
|
||||
class InvalidEbookCreatedDatetimeException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Invalid EbookCreated datetime.';
|
||||
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct(DateTimeImmutable $createdDatetime){
|
||||
$now = new DateTimeImmutable();
|
||||
$this->message = 'Invalid EbookCreated datetime. ' . $createdDatetime->format('Y-m-d') . ' is not between ' . EBOOK_EARLIEST_CREATION_DATE->format('Y-m-d') . ' and ' . $now->format('Y-m-d') . '.';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue