From e5dc28b49e42efc01a48ddf1728e65bd95e446b7 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sun, 29 Oct 2023 19:23:55 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Console/UpdateBestAnswerCounts.php | 13 +++++++++++-- src/UserBestAnswerCount.php | 6 ++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/Console/UpdateBestAnswerCounts.php b/src/Console/UpdateBestAnswerCounts.php index c47c377..ff2ef56 100644 --- a/src/Console/UpdateBestAnswerCounts.php +++ b/src/Console/UpdateBestAnswerCounts.php @@ -1,5 +1,14 @@ bestAnswers = $bestAnswers; } - + /** * @var string */ diff --git a/src/UserBestAnswerCount.php b/src/UserBestAnswerCount.php index 5abd7c5..3b94001 100644 --- a/src/UserBestAnswerCount.php +++ b/src/UserBestAnswerCount.php @@ -20,18 +20,16 @@ class UserBestAnswerCount * @var BestAnswerRepository */ public $bestAnswers; - + public function __construct(BestAnswerRepository $bestAnswers) { $this->bestAnswers = $bestAnswers; } - + public function __invoke(UserSerializer $serializer, User $user, array $attributes): array { $attributes['bestAnswerCount'] = $user->best_answer_count ?? $this->bestAnswers->calculateBestAnswersForUser($user); return $attributes; } - - }