@@ -42,7 +42,7 @@ public static function getMarkClassName(): string
4242 ->__toString ();
4343 }
4444
45- public static function add (Model $ markable , Model $ user , string $ value = null , array $ metadata = []): self
45+ public static function add (Model $ markable , Model $ user , ? string $ value = null , array $ metadata = []): self
4646 {
4747 static ::validMarkable ($ markable );
4848
@@ -68,7 +68,7 @@ public static function add(Model $markable, Model $user, string $value = null, a
6868 return static ::firstOrCreate ($ attributes , $ values );
6969 }
7070
71- public static function remove (Model $ markable , Model $ user , string $ value = null )
71+ public static function remove (Model $ markable , Model $ user , ? string $ value = null )
7272 {
7373 static ::validMarkable ($ markable );
7474
@@ -80,7 +80,7 @@ public static function remove(Model $markable, Model $user, string $value = null
8080 ])->get ()->each ->delete ();
8181 }
8282
83- public static function count (Model $ markable , string $ value = null ): int
83+ public static function count (Model $ markable , ? string $ value = null ): int
8484 {
8585 static ::validMarkable ($ markable );
8686
@@ -91,7 +91,7 @@ public static function count(Model $markable, string $value = null): int
9191 ])->count ();
9292 }
9393
94- public static function has (Model $ markable , Model $ user , string $ value = null ): bool
94+ public static function has (Model $ markable , Model $ user , ? string $ value = null ): bool
9595 {
9696 return static ::where ([
9797 app (static ::class)->getUserIdColumn () => $ user ->getKey (),
@@ -101,7 +101,7 @@ public static function has(Model $markable, Model $user, string $value = null):
101101 ])->exists ();
102102 }
103103
104- public static function toggle (Model $ markable , Model $ user , string $ value = null , array $ metadata = [])
104+ public static function toggle (Model $ markable , Model $ user , ? string $ value = null , array $ metadata = [])
105105 {
106106 return static ::has ($ markable , $ user , $ value )
107107 ? static ::remove ($ markable , $ user , $ value )
0 commit comments