From: Eileen McNaughton Date: Thu, 15 Jan 2015 06:46:19 +0000 (+1300) Subject: a few mor fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d8689418f1b8de4dcf29901805c97e27a3081c81;p=civicrm-core.git a few mor fixes --- diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index 11fc17586b..0c65ba6c76 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -67,7 +67,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { } /** - * Fetch object based on array of properties + * Fetch object based on array of properties. * * @param array $params * (reference ) an assoc array of name/value pairs. @@ -137,12 +137,12 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { } /** - * Delete the activity + * Delete the activity. * * @param array $params * @param bool $moveToTrash * - * @return void + * @return mixed */ public static function deleteActivity(&$params, $moveToTrash = FALSE) { // CRM-9137 @@ -243,7 +243,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { } /** - * Delete activity assignment record + * Delete activity assignment record. * * @param int $activityId * @param int $recordTypeID @@ -258,7 +258,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity { } /** - * Process the activities + * Process the activities. * * @param array $params * Associated array of the submitted values. diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 517a9963cc..6ab1d92e46 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -85,10 +85,10 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { //Set defaults for autocomplete and contact reference options $this->_defaults['autocompleteContactSearch'] = array( - '1' => 1 + '1' => 1, ) + $autoSearchFields; $this->_defaults['autocompleteContactReference'] = array( - '1' => 1 + '1' => 1, ) + $cRSearchFields; // we can handle all the ones defined in the metadata here. Others to be converted diff --git a/CRM/Contact/Form/Edit/Phone.php b/CRM/Contact/Form/Edit/Phone.php index 28b44f071d..dd50d6c221 100644 --- a/CRM/Contact/Form/Edit/Phone.php +++ b/CRM/Contact/Form/Edit/Phone.php @@ -62,7 +62,7 @@ class CRM_Contact_Form_Edit_Phone { $form->addSelect("phone[$blockId][phone_type_id]", array( 'entity' => 'phone', 'class' => 'eight', - 'placeholder' => NULL + 'placeholder' => NULL, )); //main phone number with crm_phone class @@ -75,7 +75,7 @@ class CRM_Contact_Form_Edit_Phone { $form->addSelect("phone[$blockId][location_type_id]", array( 'entity' => 'phone', 'class' => 'eight', - 'placeholder' => NULL + 'placeholder' => NULL, )); //is_Primary radio diff --git a/CRM/Contact/Form/RelatedContact.php b/CRM/Contact/Form/RelatedContact.php index e3543b6538..3ba4ceee78 100644 --- a/CRM/Contact/Form/RelatedContact.php +++ b/CRM/Contact/Form/RelatedContact.php @@ -149,9 +149,6 @@ class CRM_Contact_Form_RelatedContact extends CRM_Core_Form { /** * Form submission of new/edit contact is processed. - * - * - * @return void */ public function postProcess() { // store the submitted values in an array diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index 7321c95e72..7bce1b4c08 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -85,15 +85,15 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { static protected $_searchFormValues; /** - * Build all the data structures needed to build the form - * - * @param object $this + * Build all the data structures needed to build the form. */ public function preProcess() { self::preProcessCommon($this); } /** + * Common pre-processing function. + * * @param CRM_Core_Form $form * @param bool $useTable */ @@ -272,8 +272,9 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { } /** - * Get the contact id for custom search - * we are not using prev/next table incase of custom search + * Get the contact id for custom search. + * + * we are not using prev/next table in case of custom search */ public function getContactIds() { // need to perform action on all contacts diff --git a/CRM/Contact/Selector/Custom.php b/CRM/Contact/Selector/Custom.php index 16f033c448..54a0f1132a 100644 --- a/CRM/Contact/Selector/Custom.php +++ b/CRM/Contact/Selector/Custom.php @@ -260,7 +260,7 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { } /** - * Returns all the rows in the given offset and rowCount + * Returns all the rows in the given offset and rowCount. * * @param string $action * The action being performed. @@ -370,11 +370,9 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { } /** - * Given the current formValues, gets the query in local - * language + * Given the current formValues, gets the query in local language. * - * @param array ( - * reference) $formValues submitted formValues + * @param array $formValues submitted formValues * * @return array * which contains an array of strings diff --git a/CRM/Core/Controller/Simple.php b/CRM/Core/Controller/Simple.php index 332cf17268..f27d31c05c 100644 --- a/CRM/Core/Controller/Simple.php +++ b/CRM/Core/Controller/Simple.php @@ -53,7 +53,7 @@ class CRM_Core_Controller_Simple extends CRM_Core_Controller { * * @return \CRM_Core_Controller_Simple */ - function __construct( + public function __construct( $path, $title, $mode = NULL, @@ -127,8 +127,10 @@ class CRM_Core_Controller_Simple extends CRM_Core_Controller { } /** - * A wrapper for getTemplateFileName that includes calling the hook to - * prevent us from having to copy & paste the logic of calling the hook + * A wrapper for getTemplateFileName. + * + * This includes calling the hook to prevent us from having to copy & paste + * the logic of calling the hook */ public function getHookedTemplateFileName() { $pageTemplateFile = $this->getTemplateFileName(); diff --git a/CRM/Core/QuickForm/Action/Upload.php b/CRM/Core/QuickForm/Action/Upload.php index 9c58bdaec6..e36492ab31 100644 --- a/CRM/Core/QuickForm/Action/Upload.php +++ b/CRM/Core/QuickForm/Action/Upload.php @@ -134,7 +134,7 @@ class CRM_Core_QuickForm_Action_Upload extends CRM_Core_QuickForm_Action { } /** - * @todo what do I do? + * @todo document what I do. * * @param CRM_Core_Form $page * @param string $actionName diff --git a/CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php b/CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php index bd31575094..fe878ad5b4 100644 --- a/CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php +++ b/CRM/Dedupe/BAO/QueryBuilder/IndividualSupervised.php @@ -19,9 +19,18 @@ class CRM_Dedupe_BAO_QueryBuilder_IndividualSupervised extends CRM_Dedupe_BAO_Qu $civicrm_email = CRM_Utils_Array::value('civicrm_email', $rg->params, array()); $params = array( - 1 => array(CRM_Utils_Array::value('first_name', $civicrm_contact, ''), 'String'), - 2 => array(CRM_Utils_Array::value('last_name', $civicrm_contact, ''), 'String'), - 3 => array(CRM_Utils_Array::value('email', $civicrm_email, ''), 'String'), + 1 => array( + CRM_Utils_Array::value('first_name', $civicrm_contact, ''), + 'String', + ), + 2 => array( + CRM_Utils_Array::value('last_name', $civicrm_contact, ''), + 'String', + ), + 3 => array( + CRM_Utils_Array::value('email', $civicrm_email, ''), + 'String', + ), ); return array( @@ -56,7 +65,9 @@ class CRM_Dedupe_BAO_QueryBuilder_IndividualSupervised extends CRM_Dedupe_BAO_Qu email1.email=email2.email WHERE contact1.contact_type = 'Individual' AND " . self::internalFilters($rg); - return array("civicrm_contact.{$rg->name}.{$rg->threshold}" => $query); + return array( + "civicrm_contact.{$rg->name}.{$rg->threshold}" => $query + ); } } diff --git a/CRM/Event/Form/Task/Email.php b/CRM/Event/Form/Task/Email.php index 8480b2dc69..d2ab1df047 100644 --- a/CRM/Event/Form/Task/Email.php +++ b/CRM/Event/Form/Task/Email.php @@ -64,7 +64,7 @@ class CRM_Event_Form_Task_Email extends CRM_Event_Form_Task { /** * Build all the data structures needed to build the form */ - function preProcess() { + public function preProcess() { CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this); parent::preProcess(); diff --git a/CRM/Pledge/Selector/Search.php b/CRM/Pledge/Selector/Search.php index 8a0c98e397..d940e01e60 100644 --- a/CRM/Pledge/Selector/Search.php +++ b/CRM/Pledge/Selector/Search.php @@ -144,7 +144,7 @@ class CRM_Pledge_Selector_Search extends CRM_Core_Selector_Base { * * @return \CRM_Pledge_Selector_Search */ - function __construct( + public function __construct( &$queryParams, $action = CRM_Core_Action::NONE, $additionalClause = NULL, diff --git a/CRM/SMS/Form/Provider.php b/CRM/SMS/Form/Provider.php index 5c773d8212..91a15f1949 100644 --- a/CRM/SMS/Form/Provider.php +++ b/CRM/SMS/Form/Provider.php @@ -61,9 +61,7 @@ class CRM_SMS_Form_Provider extends CRM_Core_Form { } /** - * Build the form object - * - * @return void + * Build the form object. */ public function buildQuickForm() { parent::buildQuickForm(); @@ -123,7 +121,7 @@ class CRM_SMS_Form_Provider extends CRM_Core_Form { } /** - * Set the default values of various form elements + * Set the default values of various form elements. * * @return array */