X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c429cf78187e80deb63982a282a1c6889f30291a..refs/pull/5721/head:/app/Entities/Tools/SlugGenerator.php diff --git a/app/Entities/Tools/SlugGenerator.php b/app/Entities/Tools/SlugGenerator.php index 52e5700da..5df300bb0 100644 --- a/app/Entities/Tools/SlugGenerator.php +++ b/app/Entities/Tools/SlugGenerator.php @@ -2,15 +2,16 @@ namespace BookStack\Entities\Tools; +use BookStack\App\Model; +use BookStack\App\Sluggable; use BookStack\Entities\Models\BookChild; -use BookStack\Interfaces\Sluggable; use Illuminate\Support\Str; class SlugGenerator { /** * Generate a fresh slug for the given entity. - * The slug will generated so it does not conflict within the same parent item. + * The slug will be generated so that it doesn't conflict within the same parent item. */ public function generate(Sluggable $model): string { @@ -38,6 +39,8 @@ class SlugGenerator /** * Check if a slug is already in-use for this * type of model within the same parent. + * + * @param Sluggable&Model $model */ protected function slugInUse(string $slug, Sluggable $model): bool {