Skip to content

Commit

Permalink
Merge pull request #25 from ElmageAce/fix/achievement-progress-proprty
Browse files Browse the repository at this point in the history
  • Loading branch information
assada authored Aug 28, 2023
2 parents e4030b1 + 6b116e2 commit c37d4b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model/AchievementProgress.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function details(): BelongsTo
*/
public function isUnlocked(): bool
{
if (!is_null($this->unlockedAt)) {
if (!is_null($this->unlocked_at)) {
return true;
}
if ($this->points >= $this->details->points) {
Expand Down Expand Up @@ -124,7 +124,7 @@ public function save(array $options = []): bool
$this->id = Uuid::uuid4()->toString();
}
$recentlyUnlocked = false;
if (is_null($this->unlockedAt) && $this->isUnlocked()) {
if (is_null($this->unlocked_at) && $this->isUnlocked()) {
$recentlyUnlocked = true;
$this->points = $this->details->points;
$this->unlocked_at = Carbon::now();
Expand Down

0 comments on commit c37d4b8

Please sign in to comment.