mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Add CanEditEbooks benefit and clean up some PHPStan errors
This commit is contained in:
parent
23b5c8ef31
commit
1a742baa51
10 changed files with 75 additions and 14 deletions
|
@ -444,7 +444,7 @@ class Ebook{
|
|||
|
||||
protected function GetReadingTime(): string{
|
||||
if(!isset($this->_ReadingTime)){
|
||||
$readingTime = ceil($this->WordCount / AVERAGE_READING_WORDS_PER_MINUTE);
|
||||
$readingTime = ceil(($this->WordCount ?? 0) / AVERAGE_READING_WORDS_PER_MINUTE);
|
||||
$this->_ReadingTime = (string)$readingTime;
|
||||
|
||||
if($readingTime < 60){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue