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

[REF] Minor cleanup around action schedule code. #17151

Merged
merged 1 commit into from
May 1, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code cleanup

Before

CRM_Core_BAO_ActionSchedule::processQueue is only called from one place. It either succeeds or throws
an exception & the construction of a return array & handling of that array is just meaningless code

After

No return value & lack of exception is understood as success.

Technical Details

Some additional fixes around declared return types & exceptions & using strict typing

Comments

@civibot
Copy link

civibot bot commented Apr 23, 2020

(Standard links)

@civibot civibot bot added the master label Apr 23, 2020
*/
public static function buildRecipientContacts($mappingID, $now, $params = []) {
public static function buildRecipientContacts(int $mappingID, $now, $params = []) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fn is only called from one place

@seamuslee001
Copy link
Contributor

@eileenmcnaughton can you please rebase, This looks fine otherwise

CRM_Core_BAO_ActionSchedule::processQueue is only called from one place. It either succeeds or throws
an exception so there is no value in returning anything & the parsing of what it does return assumes that it
could return false

Some slight tightenig around typing as buildRecipientContact is also only called from one place
@eileenmcnaughton
Copy link
Contributor Author

test this please

@colemanw
Copy link
Member

colemanw commented May 1, 2020

test this please

@seamuslee001
Copy link
Contributor

Test failures unrelated

@seamuslee001 seamuslee001 merged commit 2db7318 into civicrm:master May 1, 2020
@seamuslee001 seamuslee001 deleted the actsched branch May 1, 2020 07:38
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.

3 participants