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

[Php70] Handle reverse sorting check on IfToSpaceshipRector #1676

Merged
merged 6 commits into from
Jan 14, 2022

Conversation

samsonasik
Copy link
Member

Comment on lines -33 to -39
usort($languages, function ($a, $b) {
if ($a[0] === $b[0]) {
return 0;
}

return ($a[0] < $b[0]) ? -1 : 1;
});
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed above skip as it seems applied now:

-            if ($a[0] === $b[0]) {
-                return 0;
-            }
-
-            return ($a[0] < $b[0]) ? -1 : 1;
+            return $a[0] <=> $b[0];
         });

moved to new fixture d0e7b44

ref https://3v4l.org/6jaK6 and https://3v4l.org/ReF9k for check equal result.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@samsonasik
Copy link
Member Author

I am merging it ;)

@samsonasik samsonasik merged commit a9d2982 into main Jan 14, 2022
@samsonasik samsonasik deleted the close-1674 branch January 14, 2022 17:18
@TomasVotruba
Copy link
Member

Thank you 😌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants