Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Conversation

@samsonasik
Copy link
Contributor

  • Is this related to quality assurance?

… to avoid repetitive uri->getQuery() when possible
Copy link
Member

@michalbundyra michalbundyra left a comment

Choose a reason for hiding this comment

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

👍

$path = $uri->getPath();
if ($uri->getQuery()) {
$path .= '?' . $uri->getQuery();
if ($query = $uri->getQuery()) {
Copy link
Member

Choose a reason for hiding this comment

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

I really don't like doing assignment in conditionals, as it's an easy vector for mistakes. When I merge, I'll assign prior to the conditional.

@weierophinney weierophinney merged commit db7c1f9 into zendframework:master Aug 13, 2018
weierophinney added a commit that referenced this pull request Aug 13, 2018
weierophinney added a commit that referenced this pull request Aug 13, 2018
@weierophinney
Copy link
Member

Thanks, @samsonasik

@samsonasik samsonasik deleted the optimize-query branch August 13, 2018 18:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants