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

Remove extraneous elses #19171

Merged
merged 1 commit into from
Dec 11, 2020
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Dec 11, 2020

Overview

Further removal of elses directly after a return

Same as #19168 but a different file

This looks like a huge code change but it's just removing meaningless elses and reformatting view using
https://github.com/civicrm/civicrm-core/pull/19171/files?w=1 for better readability

Before

Constructs like

if ($a = 1) {
  return;
}
else {
  // do the thing
}

After

if ($a = 1) {
  return;
}
 // do the thing

Technical Details

Further removal of elses directly after a return
@civibot
Copy link

civibot bot commented Dec 11, 2020

(Standard links)

@civibot civibot bot added the master label Dec 11, 2020
}
$errorMsg = implode(' AND ', $errorMsg);
array_unshift($values, 'Matching Contribution record not found for ' . $errorMsg . '. Row was skipped.');
return CRM_Import_Parser::ERROR;
}
}
Copy link
Contributor Author

@eileenmcnaughton eileenmcnaughton Dec 11, 2020

Choose a reason for hiding this comment

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

This looks wonky in web view but
Screenshot from 2020-12-11 14-41-47


return CRM_Import_Parser::VALID;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

double return

@eileenmcnaughton
Copy link
Contributor Author

sigh @seamuslee001 all these files are hard to make 'the change' in

@seamuslee001
Copy link
Contributor

If Jenkins likes it then I do too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants