From cc4f4e85bcc51d4a83b368277cccb0033ba58e96 Mon Sep 17 00:00:00 2001 From: Marc Michalsky forumZFD Date: Fri, 13 Nov 2020 17:15:47 +0100 Subject: [PATCH] instantiate with "self" --- CRM/TwingleCampaign/BAO/CampaignType.php | 2 +- CRM/TwingleCampaign/BAO/CustomField.php | 2 +- CRM/TwingleCampaign/BAO/CustomGroup.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/TwingleCampaign/BAO/CampaignType.php b/CRM/TwingleCampaign/BAO/CampaignType.php index 3ac6d83..b409fba 100644 --- a/CRM/TwingleCampaign/BAO/CampaignType.php +++ b/CRM/TwingleCampaign/BAO/CampaignType.php @@ -119,7 +119,7 @@ class CampaignType { ] ); if ($campaign_type = array_shift($campaign_type['values'])) { - return new CampaignType($campaign_type); + return new self($campaign_type); } else { return NULL; diff --git a/CRM/TwingleCampaign/BAO/CustomField.php b/CRM/TwingleCampaign/BAO/CustomField.php index 7ca88be..17a437b 100644 --- a/CRM/TwingleCampaign/BAO/CustomField.php +++ b/CRM/TwingleCampaign/BAO/CustomField.php @@ -200,7 +200,7 @@ class CustomField { ] ); if ($custom_field = array_shift($custom_field['values'])) { - return new CustomField($custom_field); + return new self($custom_field); } else { return NULL; diff --git a/CRM/TwingleCampaign/BAO/CustomGroup.php b/CRM/TwingleCampaign/BAO/CustomGroup.php index 4473f6a..226abe8 100644 --- a/CRM/TwingleCampaign/BAO/CustomGroup.php +++ b/CRM/TwingleCampaign/BAO/CustomGroup.php @@ -106,7 +106,7 @@ class CustomGroup { /** * @param $name * - * @return BAO\CustomGroup + * @return CustomGroup * @throws \CiviCRM_API3_Exception */ public static function fetch($name) { @@ -120,7 +120,7 @@ class CustomGroup { ] ); if ($custom_group = array_shift($custom_group['values'])) { - return new CustomGroup($custom_group); + return new self($custom_group); } else { return NULL;