Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jul 16, 2024
1 parent 92584f8 commit ee1c1b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Listeners/SaveBestAnswerToDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function removeBestAnswer(Discussion $discussion, User $actor): void
if (!$this->bestAnswer->canRemoveBestAnswer($actor, $discussion)) {
throw new PermissionDeniedException();
}

/** @var Post|null $post */
$post = $discussion->bestAnswerPost;

Expand Down
2 changes: 2 additions & 0 deletions tests/integration/api/UnsetBestAnswerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public function withPermissionUserProvider(): array

/**
* @test
*
* @dataProvider noPermissionUserProvider
*/
public function user_without_permission_cannot_unset_a_best_answer(int $userId)
Expand Down Expand Up @@ -193,6 +194,7 @@ public function user_without_permission_cannot_unset_a_best_answer(int $userId)

/**
* @test
*
* @dataProvider withPermissionUserProvider
*/
public function user_with_permission_can_unset_a_best_answer(int $userId)
Expand Down

0 comments on commit ee1c1b8

Please sign in to comment.