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

Another always-true-if #23559

Merged
merged 1 commit into from
May 26, 2022
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Another always-true-if

Before

We can see that both the if and the else set relationship to TRUE - the only exception is if it returns - in which case the if isn't reache

image

After

Clarified - whitespace change pending

Technical Details

I have a couple of places like this now waiting for potentially conflicting PRs to be merged before cleaning up the whitespace

Comments

@civibot
Copy link

civibot bot commented May 24, 2022

(Standard links)

@civibot civibot bot added the master label May 24, 2022
@@ -550,7 +546,7 @@ public function import($onDuplicate, &$values) {
CRM_Utils_Hook::import('Contact', 'process', $this, $hookParams);
}

if ($relationship) {
if (1) {
Copy link
Member

Choose a reason for hiding this comment

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

@eileenmcnaughton that means the else part is unreachable right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@monishdeb yes - I hadn't picked that up - but if you merge this I will remove the IF altogether & the else & do whitespace in a follow up

Copy link
Member

Choose a reason for hiding this comment

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

cool 👍

@monishdeb
Copy link
Member

Simple cleanup, doesn't impact the import process, did a quick r-run.

@monishdeb monishdeb merged commit 36f871a into civicrm:master May 26, 2022
@eileenmcnaughton eileenmcnaughton deleted the import_yay branch May 26, 2022 06:12
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