]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/SlugGenerator.php
Updated minimum php version from 7.3 to 7.4
[bookstack] / app / Entities / Tools / SlugGenerator.php
index 52e5700da24b94c9e1e6fb31d744f9958f189834..9fd9036adefdc84661fa28926212edacd8a83021 100644 (file)
@@ -4,13 +4,14 @@ namespace BookStack\Entities\Tools;
 
 use BookStack\Entities\Models\BookChild;
 use BookStack\Interfaces\Sluggable;
+use BookStack\Model;
 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
     {