mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 23:30:35 -04:00
Fix PHPStan errors
This commit is contained in:
parent
79daa82bf4
commit
72d679a04f
12 changed files with 53 additions and 0 deletions
|
@ -2,5 +2,6 @@
|
|||
namespace Exceptions;
|
||||
|
||||
class EbookDescriptionRequiredException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Ebook Description required.';
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
namespace Exceptions;
|
||||
|
||||
class EbookIdentifierRequiredException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Ebook Identifier required.';
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
namespace Exceptions;
|
||||
|
||||
class EbookIndexableTextRequiredException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Ebook IndexableText required.';
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
namespace Exceptions;
|
||||
|
||||
class EbookLongDescriptionRequiredException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Ebook LongDescription required.';
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
namespace Exceptions;
|
||||
|
||||
class EbookTitleRequiredException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Ebook Title required.';
|
||||
}
|
||||
|
|
|
@ -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') . '.';
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace Exceptions;
|
|||
use Safe\DateTimeImmutable;
|
||||
|
||||
class InvalidEbookRepoFilesystemPathException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Invalid RepoFilesystemPath.';
|
||||
|
||||
public function __construct(?string $path){
|
||||
|
|
|
@ -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') . '.';
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace Exceptions;
|
|||
use Safe\DateTimeImmutable;
|
||||
|
||||
class InvalidEbookWwwFilesystemPathException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Invalid WwwFilesystemPath.';
|
||||
|
||||
public function __construct(?string $path){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue