Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/achievement progress property #25

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

ElmageAce
Copy link
Contributor

@ElmageAce ElmageAce commented May 22, 2023

I noticed this bug while working on a company project, we enabled laravel strict mode and realized there was a problem with a property.

Because we had strict mode enabled, this property unlockedAt mainly gave us problems. We eventually modified a fork of this but I thought it'd be great if I made a PR with the fix.

First time in a while I'm making PR to an open-source project, let me know if I missed anything. Thanks

public function isUnlocked(): bool
    {
        if (!is_null($this->unlockedAt)) {
            return true;
        }
        if ($this->points >= $this->details->points) {
            return true;
        }
        return false;
    }
`

@assada assada merged commit c37d4b8 into assada:master Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants