diff --git a/CRM/TwingleCampaign/BAO/CustomField.php b/CRM/TwingleCampaign/BAO/CustomField.php index c634d55..969be36 100644 --- a/CRM/TwingleCampaign/BAO/CustomField.php +++ b/CRM/TwingleCampaign/BAO/CustomField.php @@ -245,7 +245,7 @@ class CRM_TwingleCampaign_BAO_CustomField { } /** - * Get a custom field mapping (e.g. ['project_id' => 'custom_42']) + * Get a custom field mapping (e.g. ['twingle_project_id' => 'custom_42']) * * @return array * Associative array with a mapping of all custom fields used by this extension diff --git a/CRM/TwingleCampaign/BAO/TwingleApiCall.php b/CRM/TwingleCampaign/BAO/TwingleApiCall.php index 980e278..08e1f5f 100644 --- a/CRM/TwingleCampaign/BAO/TwingleApiCall.php +++ b/CRM/TwingleCampaign/BAO/TwingleApiCall.php @@ -25,7 +25,7 @@ class CRM_TwingleCampaign_BAO_TwingleApiCall { * * @throws API_Exception */ - public function __construct($apiKey, int $limit) { + public function __construct(string $apiKey, int $limit) { $this->apiKey = $apiKey; $this->limit = $limit; @@ -118,13 +118,14 @@ class CRM_TwingleCampaign_BAO_TwingleApiCall { * * @return array */ - public function getEvent($projectId, $eventId = NULL) { + public + function getEvent($projectId, $eventId = NULL) { $result = []; $url = empty($eventId) ? $this->protocol . 'project' . $this->baseUrl . $projectId . '/event' : $this->protocol . 'project' . $this->baseUrl . $projectId . '/event/' - . $eventId; + . $eventId; $offset = 0; $finished = FALSE; @@ -157,7 +158,8 @@ class CRM_TwingleCampaign_BAO_TwingleApiCall { * * @return array|NULL */ - public function getProjectEmbedData($projectId) { + public + function getProjectEmbedData($projectId) { $result = $this->getProject($projectId); @@ -186,7 +188,8 @@ class CRM_TwingleCampaign_BAO_TwingleApiCall { * @return array|bool * Returns the result array of the curl or FALSE, if the curl failed */ - private function curlGet($url, $params = NULL) { + private + function curlGet($url, $params = NULL) { if (!empty($params)) { $url = $url . '?' . http_build_query($params); } @@ -216,7 +219,8 @@ class CRM_TwingleCampaign_BAO_TwingleApiCall { * @return false|mixed * Returns the result array of the curl or FALSE, if the curl failed */ - private function curlPost($url, $data) { + private + function curlPost($url, $data) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($curl, CURLOPT_POST, TRUE);