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

CRM-20157, CRM-20195 Dedupe code cleanup #9907

Merged
merged 4 commits into from
Mar 8, 2017

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Feb 27, 2017

unused variables, remove deprecated fatals.

Unfortunately the deprecated fatals removal made it hard to read as it alters the indentation by adding a try-catch :-( The only change in that commit is the try-catch addition + the removal of the fatals


@eileenmcnaughton
Copy link
Contributor Author

@JKingsnorth this is still on the theme of minor code tidy-ups

@@ -282,7 +282,7 @@ public static function retrieve($cacheKey, $join = NULL, $whereClause = NULL, $o

if (!empty($select)) {
$extraData = array();
foreach ($select as $dfield => $sfield) {
foreach ($select as $sfield) {
Copy link
Contributor

Choose a reason for hiding this comment

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

foreaches are faster if you specify the index - or so I hear?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did a quick google & didn't find anything to support that. Mostly I found for vs foreach - e.g https://coderwall.com/p/il1tog/php-for-vs-foreach-benchmark - but in general most of what I found was php 5.3 or 5.4- I expect it changes each php version

@eileenmcnaughton
Copy link
Contributor Author

@JKingsnorth is this OK to merge?

@JKingsnorth
Copy link
Contributor

Sorry, testing this fully now

@JKingsnorth
Copy link
Contributor

Tested:

  • Triggering a bounce by trying to merge the logged in user
  • A simple manual merge of two records

All seems OK.

@eileenmcnaughton eileenmcnaughton merged commit 2b4d968 into civicrm:master Mar 8, 2017
@eileenmcnaughton eileenmcnaughton deleted the dedupe_code branch March 8, 2017 10:33
@eileenmcnaughton
Copy link
Contributor Author

Thanks again @JKingsnorth

monishdeb pushed a commit to monishdeb/civicrm-core that referenced this pull request May 2, 2017
CRM-20157, CRM-20195 Dedupe code cleanup
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