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

[REF] Minor code cleanup. #17222

Merged
merged 1 commit into from
May 3, 2020
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Removes a small amount of pointless code

Before

if (!array_key_exists('related_contact', $values)) { is repeated

After

Once we condense the above to one if we find the value in the else is never used

Technical Details

Comments

Once we compress the 2 ifs we find the value in the 'else' is never used
@civibot
Copy link

civibot bot commented May 2, 2020

(Standard links)

@civibot civibot bot added the master label May 2, 2020
@demeritcowboy
Copy link
Contributor

This looks ok.

The next two ifs right after could also be combined into one if. Well, unless it's a bizzaro function where you need to call it twice to get it to give you displayName, but it doesn't look like it.

The outstanding 5.25-to-master PR still needs to be merged to get the tests to pass.

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@eileenmcnaughton
Copy link
Contributor Author

@demeritcowboy yep I spotted those next 2 - I may do a follow up

@seamuslee001
Copy link
Contributor

Looks fine to me merging

@seamuslee001 seamuslee001 merged commit 45aa6ba into civicrm:master May 3, 2020
@seamuslee001 seamuslee001 deleted the obh branch May 3, 2020 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants