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

Sorting: Usort boolean is deprecated. #4

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

MantasPetrauskas93
Copy link
Contributor

Description

Need to return 1 or -1. Boolean is deprecated on PHP8
https://wiki.php.net/rfc/stable_sorting

Copy link
Owner

@laurynasgadl laurynasgadl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use spaceship operator instead of {condition} ? 1 : -1

@laurynasgadl laurynasgadl merged commit 700612a into laurynasgadl:master Feb 8, 2022
@MantasPetrauskas93 MantasPetrauskas93 deleted the fix/php8_usort branch February 9, 2022 06:41
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