mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-07 11:24:35 +08:00
Fixed entity excerpt function signature misalignment
This commit is contained in:
@ -101,7 +101,7 @@ class Book extends Entity
|
|||||||
* @param int $length
|
* @param int $length
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getExcerpt($length = 100)
|
public function getExcerpt(int $length = 100)
|
||||||
{
|
{
|
||||||
$description = $this->description;
|
$description = $this->description;
|
||||||
return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description;
|
return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description;
|
||||||
|
@ -78,7 +78,7 @@ class Bookshelf extends Entity
|
|||||||
* @param int $length
|
* @param int $length
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getExcerpt($length = 100)
|
public function getExcerpt(int $length = 100)
|
||||||
{
|
{
|
||||||
$description = $this->description;
|
$description = $this->description;
|
||||||
return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description;
|
return strlen($description) > $length ? substr($description, 0, $length-3) . '...' : $description;
|
||||||
|
Reference in New Issue
Block a user