Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit de1549b

Browse files
committed
fix(points): Correct property naming
1 parent 69a8a25 commit de1549b

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/Service/PointCalculationService.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ final class PointCalculationService
2323

2424
// SolutionEvent
2525
public const int solutionEventEasyPoint = 10;
26-
public const int solutionEventMediumEvent = 20;
27-
public const int solutionEventHardEvent = 30;
26+
public const int solutionEventMediumPoint = 20;
27+
public const int solutionEventHardPoint = 30;
2828

2929
// FirstSolver
3030
public const int firstSolverPoint = 10;
3131

3232
// SolutionVideoEvent
33-
public const int solutionVideoEventEasy = 6;
34-
public const int solutionVideoEventMedium = 12;
35-
public const int solutionVideoEventHard = 18;
33+
public const int solutionVideoEventEasyPoint = 6;
34+
public const int solutionVideoEventMediumPoint = 12;
35+
public const int solutionVideoEventHardPoint = 18;
3636

3737
// HintOpenEvent
3838
public const int hintOpenEventPoint = 2;
3939

4040
// Weekly Question XP (#33)
41-
public const int weeklyMinSolvedQuestion = 5;
42-
public const int weeklyPerQuestionXP = 4;
41+
public const int weeklyMinSolvedQuestionPoint = 5;
42+
public const int weeklyPerQuestionXpPoint = 4;
4343

4444
public function __construct(
4545
private readonly SolutionEventRepository $solutionEventRepository,
@@ -79,8 +79,8 @@ protected function calculateSolutionQuestionPoints(User $user): int
7979

8080
return array_reduce($questions, fn (int $carry, Question $question) => $carry + match ($question->getDifficulty()) {
8181
QuestionDifficulty::Easy => self::solutionEventEasyPoint,
82-
QuestionDifficulty::Medium => self::solutionEventMediumEvent,
83-
QuestionDifficulty::Hard => self::solutionEventHardEvent,
82+
QuestionDifficulty::Medium => self::solutionEventMediumPoint,
83+
QuestionDifficulty::Hard => self::solutionEventHardPoint,
8484
default => 0,
8585
}, 0);
8686
}
@@ -176,9 +176,9 @@ protected function calculateSolutionVideoPoints(User $user): int
176176

177177
foreach ($questions as $question) {
178178
$questionPointsPair[$question->getId()] = match ($question->getDifficulty()) {
179-
QuestionDifficulty::Easy => self::solutionVideoEventEasy,
180-
QuestionDifficulty::Medium => self::solutionVideoEventMedium,
181-
QuestionDifficulty::Hard => self::solutionVideoEventHard,
179+
QuestionDifficulty::Easy => self::solutionVideoEventEasyPoint,
180+
QuestionDifficulty::Medium => self::solutionVideoEventMediumPoint,
181+
QuestionDifficulty::Hard => self::solutionVideoEventHardPoint,
182182
default => 0,
183183
};
184184
}
@@ -205,8 +205,8 @@ protected function calculateHintOpenPoints(User $user): int
205205
*/
206206
protected function calculateWeeklySolvedPunishPoints(User $user): int
207207
{
208-
$weeklyMinSolvedQuestion = self::weeklyMinSolvedQuestion;
209-
$weeklyPerQuestionXP = self::weeklyPerQuestionXP;
208+
$weeklyMinSolvedQuestion = self::weeklyMinSolvedQuestionPoint;
209+
$weeklyPerQuestionXP = self::weeklyPerQuestionXpPoint;
210210

211211
// Current date and week
212212
$currentDate = new \DateTime();

src/Twig/Components/Challenge/SolutionVideoModal.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public function __construct(
3434
public function getCost(): int
3535
{
3636
return match ($this->question->getDifficulty()) {
37-
QuestionDifficulty::Easy => PointCalculationService::solutionVideoEventEasy,
38-
QuestionDifficulty::Medium => PointCalculationService::solutionVideoEventMedium,
39-
QuestionDifficulty::Hard => PointCalculationService::solutionVideoEventHard,
37+
QuestionDifficulty::Easy => PointCalculationService::solutionVideoEventEasyPoint,
38+
QuestionDifficulty::Medium => PointCalculationService::solutionVideoEventMediumPoint,
39+
QuestionDifficulty::Hard => PointCalculationService::solutionVideoEventHardPoint,
4040
default => 0,
4141
};
4242
}

0 commit comments

Comments
 (0)