fix devops error

This commit is contained in:
ludo
2024-01-05 01:30:46 +01:00
parent 90b0af5b2d
commit 5144c1f7fd
128 changed files with 410 additions and 2580 deletions

View File

@@ -20,10 +20,9 @@ trait HasComments
public function commentAsUser(?Model $user, string $comment)
{
$comment = new Comment([
'comment' => $comment,
'is_approved' => ($user instanceof Commentator) ? ! $user->needsCommentApproval($this) : false,
'is_approved' => $user instanceof Commentator ? ! $user->needsCommentApproval($this) : false,
'user_id' => is_null($user) ? null : $user->getKey(),
'commentable_id' => $this->getKey(),
'commentable_type' => get_class(),