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] Remove unreachable code #23507

Merged
merged 1 commit into from
May 19, 2022
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented May 19, 2022

Overview

[REF] Remove unreachable code

Before

The contents of this 'if' are unreachable - however important they pretend to be

image

As we can see from #23505 - $params['id'] is always an integer if we get this far & hence per #23506 $matchedIDs is never empty if we get this far - so the else will never be accessed

After

poof

Technical Details

There is actually test cover here in the Parser_ContactTest class

The actual updates happen in the loop a little lower down....

image

Comments

@civibot
Copy link

civibot bot commented May 19, 2022

(Standard links)

@civibot civibot bot added the master label May 19, 2022
@colemanw
Copy link
Member

Now even less reachable. Bye bye.

@colemanw colemanw merged commit 4d61dc0 into civicrm:master May 19, 2022
@colemanw colemanw deleted the import_match2 branch May 19, 2022 14:41
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.

2 participants