-
-
Notifications
You must be signed in to change notification settings - Fork 825
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] Move functions back to class that uses it #20136
Conversation
(Standard links)
|
@eileenmcnaughton checkstyle got mad |
take that jenkins |
241cb61
to
6857c99
Compare
@@ -227,7 +227,7 @@ public static function isHtmlTokenInTableCell($token, $entity, $textToSearch) { | |||
* @return string | |||
* @throws \CRM_Core_Exception | |||
*/ | |||
private static function resolveTokens(string $html_message, $contact, $contribution, $messageToken, $grouped, $separator, $contributions): string { | |||
public static function resolveTokens(string $html_message, $contact, $contribution, $messageToken, $grouped, $separator, $contributions): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to move this in a bit but it started spiralling so left it for now
@colemanw can you merge this - the tests that go through this code would fatal if there is an issue in this as the main risk area is fixing references to 'self' & visibility |
Ok looks good. |
Overview
[REF] Move function back to class that uses it
Before
The class CRM_Contribute_Form_Task_PDFLetterCommon is not called from anywhere else in the git universe but functions that are really part of CRM_Contribute_Form_Task_PDF as 'distributed' onto it
After
some of the functions moved back - will move more in a bit
Technical Details
A couple of functions have been made public but in the end they won't be
Note these PDFLetterCommon classes are a pretty weird structure - I think they are about 10% trying to emulate a trait & 90% copy and paste
Comments
CRM_Contribute_Form_Task_PDFLetterCommonTest tests pass through all these lines of code