make methods formatValues() and matchContact() static
This commit is contained in:
parent
2317c7e8e1
commit
12199ad8a6
1 changed files with 3 additions and 3 deletions
|
@ -223,7 +223,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function formatValues(array &$values, string $direction) {
|
||||
public static function formatValues(array &$values, string $direction) {
|
||||
|
||||
if ($direction == self::IN) {
|
||||
|
||||
|
@ -248,7 +248,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
|
|||
}
|
||||
|
||||
if ($values['user_name']) {
|
||||
$values['contact_id'] = $this->matchContact(
|
||||
$values['contact_id'] = self::matchContact(
|
||||
$values['user_name'],
|
||||
$values['user_email']
|
||||
);
|
||||
|
@ -361,7 +361,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
|
|||
* @return int|null
|
||||
* Returns a contact id
|
||||
*/
|
||||
private function matchContact(string $names, string $email) {
|
||||
private static function matchContact(string $names, string $email): ?int {
|
||||
$names = StringOps::split_names($names); // Hopefully just a temporary solution
|
||||
$firstnames = $names['firstnames'];
|
||||
$lastname = $names['lastname'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue