transactions->run(function () use ($jobId, $taskId, $commentId, $userId, $mayRemoveOthers): void { $comment = $this->finder->find($jobId, $taskId, $commentId); $comment->ensureRemovableBy($userId, $mayRemoveOthers); $this->comments->delete($comment); }); } }