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

[5.3] Replace manual comparator with basic asort #14980

Merged
merged 2 commits into from
Aug 24, 2016
Merged

[5.3] Replace manual comparator with basic asort #14980

merged 2 commits into from
Aug 24, 2016

Conversation

rtheunissen
Copy link
Contributor

There is no need to explicitly compare here. Allow the engine to do so internally without the need to invoke the callback for each comparison.

@rtheunissen
Copy link
Contributor Author

Can run StyleCI build again, should pass.

@GrahamCampbell
Copy link
Member

StyleCI won't pass until that trailing whitespace is removed.

@GrahamCampbell GrahamCampbell changed the title Replace manual comparator with basic asort [5.3] Replace manual comparator with basic asort Aug 24, 2016
return ($a < $b) ? -1 : 1;
});
$callback
? uasort($items, $callback)
Copy link
Member

Choose a reason for hiding this comment

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

Please just keep all this on one line.

@rtheunissen
Copy link
Contributor Author

@GrahamCampbell

StyleCI won't pass until that trailing whitespace is removed.

Fixed in adb6b36.

@rtheunissen
Copy link
Contributor Author

@GrahamCampbell re: keeping it all on the same line, I was matching the style in sortBy.

@GrahamCampbell
Copy link
Member

Sortby was longer though. Meh, it doesn't really matter.

@taylorotwell taylorotwell merged commit 7598906 into laravel:5.3 Aug 24, 2016
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

3 participants