meeting the requirements of a static analyzer

This commit is contained in:
Anatoliy Poloz
2024-01-15 17:11:55 +03:00
81 changed files with 1320 additions and 501 deletions

View File

@@ -55,7 +55,7 @@ class DietComment extends Model
return $this->hasMany(DietCommentUpvote::class, 'comment_id');
}
public function isUpVoted(): bool
public function isUpVoted(): bool|int
{
if (auth()->user()) {
return auth()
@@ -68,7 +68,7 @@ class DietComment extends Model
return false;
}
public function isDownVoted(): bool
public function isDownVoted(): bool|int
{
if (auth()->user()) {
return auth()
@@ -81,7 +81,7 @@ class DietComment extends Model
return false;
}
public function removeUpVote(): bool
public function removeUpVote(): bool|int
{
if (auth()->user()) {
return auth()