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

call values() on the sorted array to reset the keys #146

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

y1n0
Copy link
Contributor

@y1n0 y1n0 commented Jun 6, 2024

without calling values, the returned array format in not consistent: sometimes a numbered array if returned (if sort happened to not change the order) or an assoc array (in case sort did actually move items around and kept their index).

Screenshot 2024-06-06 at 14 28 31

Thank you for helping to make this package better!

Please make sure you've read CONTRIBUTING.md
before submitting your pull request, and that you have:

  • provided a rationale for your change (I try not to add features that are going to have a limited user-base)
  • used the PSR-2 Coding Standard
  • added tests
  • documented any change in behaviour (e.g. updated the README.md, etc.)
  • only submitted one pull request per feature

Thank you!

without calling `values`, the returned array format in not consistent: sometimes a numbered array if returned (if sort happened to not change the order) or an assoc array (in case sort did actually move items around and kept their index).
@cviebrock cviebrock merged commit 1a3498e into cviebrock:master Jun 6, 2024
4 checks passed
@cviebrock
Copy link
Owner

Thanks ... good catch!

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.

2 participants