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

Minor cleanup on function #26217

Merged
merged 1 commit into from
May 15, 2023
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

The primary goal here was to check that it ALWAYS returns an array. It does,
so I added a type hint.

I also confirmed that
- it is not called from universe
- it is not called with no primaryParticipantID
- it is not called with excludeCancel set for false
so I did some deprecating.

Lastly there was code to handle there being no cancelStatus -
assigning a variable cancelID of 0 as a fallback. But, it
was not being used - so I fixed it to cast-to-int.

@civibot
Copy link

civibot bot commented May 14, 2023

(Standard links)

@civibot civibot bot added the master label May 14, 2023
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request May 14, 2023
I checked core & universe & this is not otherwise called so I make it
protected.

I checked civicrm#26217
that the is_array check is redundant & changed the one
place to call it to not call when empty
The primary goal here was to check that it ALWAYS returns an array. It does,
so I added a type hint.

I also confirmed that
- it is not called from universe
- it is not called with no primaryParticipantID
- it is not called with excludeCancel set for false
so I did some deprecating.

Lastly there was code to handle there being no cancelStatus -
assigning a variable cancelID of 0 as a fallback. But, it
was not being used - so I fixed it to cast-to-int.
@eileenmcnaughton eileenmcnaughton merged commit c9412a6 into civicrm:master May 15, 2023
@eileenmcnaughton eileenmcnaughton deleted the crazy_test branch May 15, 2023 01:28
@eileenmcnaughton eileenmcnaughton restored the crazy_test branch May 15, 2023 02:35
@eileenmcnaughton eileenmcnaughton deleted the crazy_test branch May 15, 2023 12:52
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