Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix lint
  • Loading branch information
nobodyatroot committed Aug 9, 2024
commit 28ace2aa7c5c991d8ab3bdea537aeffe743ac3a1
2 changes: 1 addition & 1 deletion src/Service/EntryCommentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function create(EntryCommentDto $dto, User $user, $rateLimit = true): Ent
if (!$user->apId) {
$user->ip = $dto->ip;
}

if ($rateLimit) {
$limiter = $this->entryCommentLimiter->create($dto->ip);
if ($limiter && false === $limiter->consume()->isAccepted()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Service/PostCommentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function create(PostCommentDto $dto, User $user, $rateLimit = true): Post
if (!$user->apId) {
$user->ip = $dto->ip;
}

if ($rateLimit) {
$limiter = $this->postCommentLimiter->create($dto->ip);
if ($limiter && false === $limiter->consume()->isAccepted()) {
Expand Down
Loading