level-up
level-up copied to clipboard
fix: Creating new experience issue
Description
Fix: Ensure Level ID is retrieved when adding points in GiveExperience trait
When the addPoints method in the GiveExperience trait is executed, it creates a new Experience. If the condition for the Level query returns null, the default level is retrieved from the config file. This update ensures that the Level ID is correctly retrieved in such cases.
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
Related Issues and Pull Requests
- Issue #...
- PR #...
Testing
Please provide a passing test where possible. This package uses PestPHP
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x ] New and existing unit tests pass locally with my changes
- [ ] I have made corresponding changes to the documentation [OPTIONAL]