From 9657ccf20e1130ac2dc4aa54ee70bba73e6599ea Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 5 Sep 2014 12:21:11 +1200 Subject: [PATCH] fixes to comment blocks & spelling --- CRM/Report/Form.php | 3 ++ .../Form/Contribute/OrganizationSummary.php | 2 +- api/v3/Case.php | 7 +++++ api/v3/Generic/Setvalue.php | 5 ++++ api/v3/Generic/Update.php | 3 +- api/v3/Job.php | 28 +++++++++++++++---- api/v3/Profile.php | 2 +- api/v3/Tag.php | 2 ++ api/v3/examples/Group/getfields.php | 2 +- api/v3/examples/Tag/Getfields.php | 2 +- tests/phpunit/api/v3/EventTest.php | 8 +++--- tests/phpunit/api/v3/GroupTest.php | 2 +- tests/phpunit/api/v3/TagTest.php | 2 +- 13 files changed, 50 insertions(+), 18 deletions(-) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 38976d9353..7a6101f0ce 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -2253,6 +2253,9 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND } } + /** + * Post Processing function for Form (postProcessCommon should be used to set other variables from input as the api accesses that function) + */ function beginPostProcess() { $this->setParams($this->controller->exportValues($this->_name)); diff --git a/CRM/Report/Form/Contribute/OrganizationSummary.php b/CRM/Report/Form/Contribute/OrganizationSummary.php index 160345197e..2bd2396bda 100644 --- a/CRM/Report/Form/Contribute/OrganizationSummary.php +++ b/CRM/Report/Form/Contribute/OrganizationSummary.php @@ -413,7 +413,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { } /** - * @param $rows + * @param array $rows */ function alterDisplay(&$rows) { // custom code to alter rows diff --git a/api/v3/Case.php b/api/v3/Case.php index a19d0f7d09..f19ee9c649 100644 --- a/api/v3/Case.php +++ b/api/v3/Case.php @@ -266,6 +266,11 @@ SELECT DISTINCT case_id /** * Deprecated. Use activity API instead + * + * @param array $params + * + * @throws API_Exception + * @return array */ function civicrm_api3_case_activity_create($params) { return civicrm_api3_activity_create($params); @@ -415,6 +420,8 @@ function _civicrm_api3_case_read($caseId, $options) { /** * Internal function to format create params for processing + * + * @param array $params */ function _civicrm_api3_case_format_params(&$params) { // figure out case type id from case type and vice-versa diff --git a/api/v3/Generic/Setvalue.php b/api/v3/Generic/Setvalue.php index ff3e601187..bb1055259d 100644 --- a/api/v3/Generic/Setvalue.php +++ b/api/v3/Generic/Setvalue.php @@ -1,6 +1,11 @@ 'Start Date'); @@ -241,7 +242,7 @@ function civicrm_api3_job_mail_report($params) { * * id - Integer - greetings option group * - * @param $params + * @param array $params * * @return boolean true if success, else false * @static @@ -356,6 +357,10 @@ function civicrm_api3_job_process_sms($params) { /** * Job to get mail responses from civimailing + * + * @param array $params + * + * @return array */ function civicrm_api3_job_fetch_bounces($params) { $lock = new CRM_Core_Lock('civimail.job.EmailProcessor'); @@ -375,6 +380,10 @@ function civicrm_api3_job_fetch_bounces($params) { /** * Job to get mail and create activities + * + * @param array $params + * + * @return array */ function civicrm_api3_job_fetch_activities($params) { $lock = new CRM_Core_Lock('civimail.job.EmailProcessor'); @@ -569,6 +578,9 @@ function civicrm_api3_job_cleanup( $params ) { /** * Set expired relationships to disabled. * + * @param array $params + * + * @return array */ function civicrm_api3_job_disable_expired_relationships($params) { $result = CRM_Contact_BAO_Relationship::disableExpiredRelationships(); @@ -585,8 +597,12 @@ function civicrm_api3_job_disable_expired_relationships($params) { * it is recommended that they use the limit clause to limit the number of smart groups * evaluated on a per job basis. Might also help to increase the smartGroupCacheTimeout * and use the cache + * + * @param array $params + * + * @return array */ -function civicrm_api3_job_group_rebuild( $params ) { +function civicrm_api3_job_group_rebuild($params) { $lock = new CRM_Core_Lock('civimail.job.groupRebuild'); if (!$lock->isAcquired()) { return civicrm_api3_create_error('Could not acquire lock, another EmailProcessor process is running'); diff --git a/api/v3/Profile.php b/api/v3/Profile.php index 08a1914d5e..04eb431457 100644 --- a/api/v3/Profile.php +++ b/api/v3/Profile.php @@ -693,7 +693,7 @@ function _civicrm_api3_map_profile_fields_to_entity(&$field) { * * @param $profileID * - * @return array + * @return integer|string * @throws CiviCRM_API3_Exception */ function _civicrm_api3_profile_getProfileID($profileID) { diff --git a/api/v3/Tag.php b/api/v3/Tag.php index 2189159e43..92415babb4 100644 --- a/api/v3/Tag.php +++ b/api/v3/Tag.php @@ -55,6 +55,8 @@ function civicrm_api3_tag_create($params) { /** * Specify Meta data for create. Note that this data is retrievable via the getfields function * and is used for pre-filling defaults and ensuring mandatory requirements are met. + * + * @param array $params */ function _civicrm_api3_tag_create_spec(&$params) { $params['used_for']['api.default'] = 'civicrm_contact'; diff --git a/api/v3/examples/Group/getfields.php b/api/v3/examples/Group/getfields.php index 490f2c7f0a..c601bd49e1 100644 --- a/api/v3/examples/Group/getfields.php +++ b/api/v3/examples/Group/getfields.php @@ -1,7 +1,7 @@ 'create'); $result = $this->callAPISuccess('event', 'getfields', $params); $this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__); @@ -509,19 +509,19 @@ class api_v3_EventTest extends CiviUnitTestCase { * test api_action param also works */ function testgetfieldsRest() { - $description = "demonstrate use of getfields to interogate api"; + $description = "demonstrate use of getfields to interrogate api"; $params = array('api_action' => 'create'); $result = $this->callAPISuccess('event', 'getfields', $params); $this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__); } function testgetfieldsGet() { - $description = "demonstrate use of getfields to interogate api"; + $description = "demonstrate use of getfields to interrogate api"; $params = array('action' => 'get'); $result = $this->callAPISuccess('event', 'getfields', $params); $this->assertEquals('title', $result['values']['event_title']['name'], 'in line ' . __LINE__); } function testgetfieldsDelete() { - $description = "demonstrate use of getfields to interogate api"; + $description = "demonstrate use of getfields to interrogate api"; $params = array('action' => 'delete'); $result = $this->callAPISuccess('event', 'getfields', $params); $this->assertEquals(1, $result['values']['id']['api.required']); diff --git a/tests/phpunit/api/v3/GroupTest.php b/tests/phpunit/api/v3/GroupTest.php index 6def8b7ff9..e808bc4d0a 100644 --- a/tests/phpunit/api/v3/GroupTest.php +++ b/tests/phpunit/api/v3/GroupTest.php @@ -152,7 +152,7 @@ class api_v3_GroupTest extends CiviUnitTestCase { } function testgetfields() { - $description = "demonstrate use of getfields to interogate api"; + $description = "demonstrate use of getfields to interrogate api"; $params = array('action' => 'create'); $result = $this->callAPIAndDocument('group', 'getfields', $params, __FUNCTION__, __FILE__, $description, 'getfields', 'getfields'); $this->assertEquals(1, $result['values']['is_active']['api.default']); diff --git a/tests/phpunit/api/v3/TagTest.php b/tests/phpunit/api/v3/TagTest.php index 6d2685ce2e..24d531a93e 100644 --- a/tests/phpunit/api/v3/TagTest.php +++ b/tests/phpunit/api/v3/TagTest.php @@ -186,7 +186,7 @@ class api_v3_TagTest extends CiviUnitTestCase { } function testTagGetfields() { - $description = "demonstrate use of getfields to interogate api"; + $description = "demonstrate use of getfields to interrogate api"; $params = array('action' => 'create'); $result = $this->callAPIAndDocument('tag', 'getfields', $params, __FUNCTION__, __FILE__, $description, NULL, 'getfields'); $this->assertEquals('civicrm_contact', $result['values']['used_for']['api.default']); -- 2.25.1