-
-
Notifications
You must be signed in to change notification settings - Fork 824
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 unused parameters from cancel #18997
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Standard links)
|
cancel as a protected function is only called from one place and the processContribution value is always false. This means that the returned processContribution value is always false - so we don't need to return it as it is set to false already. In addition the currently returned updateResult is no longer used so we don't need to return that either. I will do the same changes in a separate PR for processFail
eileenmcnaughton
force-pushed
the
trans
branch
from
November 19, 2020 21:39
85c29a0
to
154407b
Compare
@seamuslee001 this & the related are the next 2 minor cleanups on this code - basically we removed some functionality (onlinepending, details pop ups) from functions that called this so just working through all the stuff that is no longer needed |
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 21, 2020
Once civicrm#18997 & civicrm#18998 is merged it becomes clear that processContribution can never be true & hence this code is unreachable
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 21, 2020
Once civicrm#18997 & civicrm#18998 is merged it becomes clear that processContribution can never be true & hence this code is unreachable
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 21, 2020
Once civicrm#18997 & civicrm#18998 is merged it becomes clear that processContribution can never be true & hence this code is unreachable
@seamuslee001 @colemanw can I get a merge on this & #18998 - in the end both functions will go altogether |
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 22, 2020
This test checks that 1 & only 1 activity is created when a membership is cancelled because the related contribution is cancelled. It is currently failing as there is an extra 'status changed from cancelled to cancelled' activity created. The fix is simple but not included as civicrm#18997 needs to be merged first
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 22, 2020
This test checks that 1 & only 1 activity is created when a membership is cancelled because the related contribution is cancelled. It is currently failing as there is an extra 'status changed from cancelled to cancelled' activity created. The fix is simple but not included as civicrm#18997 needs to be merged first
This looks ok to me merging |
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 22, 2020
This test checks that 1 & only 1 activity is created when a membership is cancelled because the related contribution is cancelled. It is currently failing as there is an extra 'status changed from cancelled to cancelled' activity created. The fix is simple but not included as civicrm#18997 needs to be merged first
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 22, 2020
Once civicrm#18997 & civicrm#18998 is merged it becomes clear that processContribution can never be true & hence this code is unreachable
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 22, 2020
Once civicrm#18997 & civicrm#18998 is merged it becomes clear that processContribution can never be true & hence this code is unreachable
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 23, 2020
Once civicrm#18997 & civicrm#18998 is merged it becomes clear that processContribution can never be true & hence this code is unreachable
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 23, 2020
This test checks that 1 & only 1 activity is created when a membership is cancelled because the related contribution is cancelled. It is currently failing as there is an extra 'status changed from cancelled to cancelled' activity created. The fix is simple but not included as civicrm#18997 needs to be merged first
eileenmcnaughton
added a commit
to eileenmcnaughton/civicrm-core
that referenced
this pull request
Nov 24, 2020
This test checks that 1 & only 1 activity is created when a membership is cancelled because the related contribution is cancelled. It is currently failing as there is an extra 'status changed from cancelled to cancelled' activity created. The fix is simple but not included as civicrm#18997 needs to be merged first
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Follow up cleanup on BAO_Contribution::fail - remove always FALSE value and unused / always FALSE return values
Before
After
poof
Technical Details
cancel as a protected function is only called from one place and the processContribution value is always false.
This means that the returned processContribution value is always false - so we don't need to return
it as it is set to false already. In addition the currently returned updateResult is no longer
used so we don't need to return that either.
I will do the same changes in a separate PR for processFail
Comments