]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/Image.php
Applied StyleCI changes, added php/larastan to attribution
[bookstack] / app / Uploads / Image.php
index ca1df3c6c5e209da107bfaaa9a0829e34cb8190c..bdf10f080fe99cd991f52bc0174e75cc4c5ac00f 100644 (file)
@@ -1,11 +1,25 @@
-<?php namespace BookStack\Uploads;
+<?php
+
+namespace BookStack\Uploads;
 
 use BookStack\Entities\Models\Page;
 use BookStack\Model;
 use BookStack\Traits\HasCreatorAndUpdater;
+use Illuminate\Database\Eloquent\Factories\HasFactory;
 
+/**
+ * @property int    $id
+ * @property string $name
+ * @property string $url
+ * @property string $path
+ * @property string $type
+ * @property int    $uploaded_to
+ * @property int    $created_by
+ * @property int    $updated_by
+ */
 class Image extends Model
 {
+    use HasFactory;
     use HasCreatorAndUpdater;
 
     protected $fillable = ['name'];
@@ -13,6 +27,7 @@ class Image extends Model
 
     /**
      * Get a thumbnail for this image.
+     *
      * @throws \Exception
      */
     public function getThumb(int $width, int $height, bool $keepRatio = false): string