instantiate with "self"

This commit is contained in:
Marc Michalsky forumZFD 2020-11-13 17:15:47 +01:00
parent a8139b8696
commit cc4f4e85bc
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
3 changed files with 4 additions and 4 deletions

View file

@ -119,7 +119,7 @@ class CampaignType {
] ]
); );
if ($campaign_type = array_shift($campaign_type['values'])) { if ($campaign_type = array_shift($campaign_type['values'])) {
return new CampaignType($campaign_type); return new self($campaign_type);
} }
else { else {
return NULL; return NULL;

View file

@ -200,7 +200,7 @@ class CustomField {
] ]
); );
if ($custom_field = array_shift($custom_field['values'])) { if ($custom_field = array_shift($custom_field['values'])) {
return new CustomField($custom_field); return new self($custom_field);
} }
else { else {
return NULL; return NULL;

View file

@ -106,7 +106,7 @@ class CustomGroup {
/** /**
* @param $name * @param $name
* *
* @return BAO\CustomGroup * @return CustomGroup
* @throws \CiviCRM_API3_Exception * @throws \CiviCRM_API3_Exception
*/ */
public static function fetch($name) { public static function fetch($name) {
@ -120,7 +120,7 @@ class CustomGroup {
] ]
); );
if ($custom_group = array_shift($custom_group['values'])) { if ($custom_group = array_shift($custom_group['values'])) {
return new CustomGroup($custom_group); return new self($custom_group);
} }
else { else {
return NULL; return NULL;