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

[NFC] Function extraction and renaming of variable for shorter refere… #11278

Merged
merged 1 commit into from
Nov 15, 2017

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

This is a function extraction towards CRM-19273. I haven't changed the logic but it is apparent that
we are changing the contribution financial type to 'the financial type of the last line
item' - which is a little dubious although it might work in practice. We should expose the field &
let people choose it

Before

code is in main function

After

code is extracted

Technical Details

This is breakdown of changes in #10962

($submittedLineItems[$previousLineItem['price_field_value_id']]['line_total'] == 0 && $submittedLineItems[$previousLineItem['price_field_value_id']]['qty'] == 1) ||
($previousLineItem['qty'] != $submittedLineItems[$previousLineItem['price_field_value_id']]['qty'])
if (($previousLineItem['line_total'] != $submittedLineItem['line_total'])
||
Copy link
Contributor

Choose a reason for hiding this comment

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

should this go on the previous line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure - at some point I liked it better on the next line - it was a deliberate change - but may I was just in a 'next liney mood'

Copy link
Member

Choose a reason for hiding this comment

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

Minor aesthetic, but seems kind of weird to me to have the || on a line by itself :

capture d ecran de 2017-11-15 10-46-34

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 don't know if it 'looks' right - but the change I just pushed is the most readable to me - ie. having the inners of the OR's separated out

…nce.

This is a function extraction towards CRM-19273. I haven't changed the logic but it is apparent that
we are changing the contribution financial type to 'the financial type of the last line
item' - which is a little dubious although it might work in practice. We should expose the field &
let people choose it
@mlutfy mlutfy merged commit 73162db into civicrm:master Nov 15, 2017
@eileenmcnaughton eileenmcnaughton deleted the towards1 branch November 15, 2017 20:05
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
[NFC] Function extraction and renaming of variable for shorter refere…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants