From 211e2fca7ae829cad7aa9f22efa306790436a634 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 2 Feb 2015 16:54:00 +1300 Subject: [PATCH] comment fixes --- CRM/Campaign/Page/DashBoard.php | 6 +++--- api/v3/Case.php | 8 ++++++-- api/v3/Generic/Getlist.php | 4 ++-- api/v3/Job.php | 24 +++++++++++------------- api/v3/OptionGroup.php | 7 ++++--- 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/CRM/Campaign/Page/DashBoard.php b/CRM/Campaign/Page/DashBoard.php index 598906e628..9e5fc6a941 100644 --- a/CRM/Campaign/Page/DashBoard.php +++ b/CRM/Campaign/Page/DashBoard.php @@ -378,7 +378,7 @@ class CRM_Campaign_Page_DashBoard extends CRM_Core_Page { * @return mixed|null */ public function browsePetition() { - // ensure valid javascript - this must have a value set + // Ensure valid javascript - this must have a value set $this->assign('searchParams', json_encode(NULL)); $this->assign('petitionCampaigns', json_encode(NULL)); @@ -388,11 +388,11 @@ class CRM_Campaign_Page_DashBoard extends CRM_Core_Page { //don't load find interface when no petition in db. if (!$petitionCount) { $this->assign('hasPetitions', FALSE); - return; + return NULL; } $this->assign('hasPetitions', TRUE); - //build the ajaxify petition search and selector. + // Build the ajax petition search and selector. $controller = new CRM_Core_Controller_Simple('CRM_Campaign_Form_Search_Petition', ts('Search Petition')); $controller->set('searchTab', 'petition'); $controller->setEmbedded(TRUE); diff --git a/api/v3/Case.php b/api/v3/Case.php index 7eb05485c1..fa1fee74be 100644 --- a/api/v3/Case.php +++ b/api/v3/Case.php @@ -64,7 +64,11 @@ function civicrm_api3_case_create($params) { return civicrm_api3_case_update($params); } - civicrm_api3_verify_mandatory($params, NULL, array('contact_id', 'subject', array('case_type', 'case_type_id'))); + civicrm_api3_verify_mandatory($params, NULL, array( + 'contact_id', + 'subject', + array('case_type', 'case_type_id')) + ); _civicrm_api3_case_format_params($params); // If format_params didn't find what it was looking for, return error @@ -177,7 +181,7 @@ function _civicrm_api3_case_delete_spec(&$params) { } /** - * Get details of a particular case, or search for cases, depending on params + * Get details of a particular case, or search for cases, depending on params. * * Please provide one (and only one) of the four get/search parameters: * diff --git a/api/v3/Generic/Getlist.php b/api/v3/Generic/Getlist.php index 3b2c8b6867..fd0669b0b6 100644 --- a/api/v3/Generic/Getlist.php +++ b/api/v3/Generic/Getlist.php @@ -67,7 +67,7 @@ function civicrm_api3_generic_getList($apiRequest) { } /** - * Set defaults for api.getlist + * Set defaults for api.getlist. * * @param string $entity * @param array $request @@ -145,7 +145,7 @@ function _civicrm_api3_generic_getlist_params(&$request) { } /** - * Fallback implementation of getlist_output. May be overridden by individual apis + * Fallback implementation of getlist_output. May be overridden by individual api functions. * * @param array $result * @param array $request diff --git a/api/v3/Job.php b/api/v3/Job.php index 29786ff4e5..3f922aacda 100644 --- a/api/v3/Job.php +++ b/api/v3/Job.php @@ -68,32 +68,30 @@ function civicrm_api3_job_create($params) { } /** - * Retrieve one or more job + * Retrieve one or more job. * * @param array $params * input parameters - * @return array * - * {@getfields email_get} + * @return array */ function civicrm_api3_job_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** - * Delete a job + * Delete a job. * * @param array $params - * - * {@getfields Job_delete} */ function civicrm_api3_job_delete($params) { _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** - * Dumb wrapper to execute scheduled jobs. Always creates success - errors - * and results are handled in the job log. + * Dumb wrapper to execute scheduled jobs. + * + * Always creates success - errors and results are handled in the job log. * * @param array $params * input parameters (unused). @@ -112,7 +110,7 @@ function civicrm_api3_job_execute($params) { } /** - * Adjust Metadata for Execute action + * Adjust Metadata for Execute action. * * @param array $params * Array or parameters determined by getfields. @@ -121,7 +119,7 @@ function _civicrm_api3_job_execute_spec(&$params) { } /** - * Geocode group of contacts based on given params + * Geocode group of contacts based on given params. * * @param array $params * input parameters. @@ -226,12 +224,12 @@ function civicrm_api3_job_mail_report($params) { } /** - * * This method allows to update Email Greetings, Postal Greetings and Addressee for a specific contact type. + * * IMPORTANT: You must first create valid option value before using via admin interface. * Check option lists for Email Greetings, Postal Greetings and Addressee * - * id - Integer - greetings option group + * @todo - is this here by mistake or should it be added to _spec function :id - Integer - greetings option group. * * @param array $params * @@ -256,7 +254,7 @@ function civicrm_api3_job_update_greeting($params) { } /** - * Adjust Metadata for Get action + * Adjust Metadata for Get action. * * The metadata is used for setting defaults, documentation & validation. * diff --git a/api/v3/OptionGroup.php b/api/v3/OptionGroup.php index 81d001b351..a80e7f5bb5 100644 --- a/api/v3/OptionGroup.php +++ b/api/v3/OptionGroup.php @@ -29,9 +29,10 @@ function civicrm_api3_option_group_create($params) { } /** - * Adjust Metadata for Create action + * Adjust Metadata for Create action. + * + * The metadata is used for setting defaults, documentation & validation. * - * The metadata is used for setting defaults, documentation & validation * @param array $params * Array or parameters determined by getfields. */ @@ -40,7 +41,7 @@ function _civicrm_api3_option_group_create_spec(&$params) { } /** - * delete an existing Option Group + * Delete an existing Option Group. * * This method is used to delete any existing Option Group. id of the group * to be deleted is required field in $params array -- 2.25.1