Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-03-04-18-48-05
[civicrm-core.git] / CRM / Utils / DeprecatedUtils.php
index ebc41265eac0a4281393a76ab45db25581e32579..d09734c486041b11bbcbc891ccc249f1b9c84c4c 100644 (file)
@@ -23,7 +23,7 @@
   | GNU Affero General Public License or the licensing of CiviCRM,     |
   | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
   +--------------------------------------------------------------------+
-*/
+ */
 
 /*
  * These functions have been deprecated out of API v3 Utils folder as they are not part of the
@@ -764,18 +764,18 @@ function _civicrm_api3_deprecated_activity_formatted_param(&$params, &$values, $
  */
 function _civicrm_api3_deprecated_add_formatted_param(&$values, &$params) {
   /* Crawl through the possible classes:
-     * Contact
-     *      Individual
-     *      Household
-     *      Organization
-     *          Location
-     *              Address
-     *              Email
-     *              Phone
-     *              IM
-     *      Note
-     *      Custom
-     */
+   * Contact
+   *      Individual
+   *      Household
+   *      Organization
+   *          Location
+   *              Address
+   *              Email
+   *              Phone
+   *              IM
+   *      Note
+   *      Custom
+   */
 
   /* Cache the various object fields */
   static $fields = NULL;
@@ -985,7 +985,12 @@ function _civicrm_api3_deprecated_add_formatted_location_blocks(&$values, &$para
   }
 
   foreach (array(
-    'Phone', 'Email', 'IM', 'OpenID', 'Phone_Ext') as $block) {
+             'Phone',
+             'Email',
+             'IM',
+             'OpenID',
+             'Phone_Ext',
+           ) as $block) {
     $name = strtolower($block);
     if (!array_key_exists($name, $values)) {
       continue;
@@ -1073,7 +1078,8 @@ function _civicrm_api3_deprecated_add_formatted_location_blocks(&$values, &$para
               foreach ($mulValues as $v1) {
                 foreach ($customOption as $v2) {
                   if ((strtolower($v2['label']) == strtolower(trim($v1))) ||
-                     (strtolower($v2['value']) == strtolower(trim($v1)))) {
+                    (strtolower($v2['value']) == strtolower(trim($v1)))
+                  ) {
                     if ($htmlType == 'CheckBox') {
                       $newValues[$key][$v2['value']] = 1;
                     }
@@ -1095,8 +1101,11 @@ function _civicrm_api3_deprecated_add_formatted_location_blocks(&$values, &$para
   _civicrm_api3_store_values($fields['Address'], $values, $params['address'][$addressCnt]);
 
   $addressFields = array(
-    'county', 'country', 'state_province',
-    'supplemental_address_1', 'supplemental_address_2',
+    'county',
+    'country',
+    'state_province',
+    'supplemental_address_1',
+    'supplemental_address_2',
     'StateProvince.name',
   );
 
@@ -1119,10 +1128,10 @@ function _civicrm_api3_deprecated_add_formatted_location_blocks(&$values, &$para
 
 /**
  *
- * @param <type> $params
+ * @param array $params
  *
  * @return array
  *   <type>
+ *   <type>
  */
 function _civicrm_api3_deprecated_duplicate_formatted_contact($params) {
   $id = CRM_Utils_Array::value('id', $params);
@@ -1223,7 +1232,8 @@ function _civicrm_api3_deprecated_validate_formatted_contact(&$params) {
  * @param array $params
  * @param $onDuplicate
  *
- * @return array|bool <type>
+ * @return array|bool
+ *   <type>
  */
 function _civicrm_api3_deprecated_create_participant_formatted($params, $onDuplicate) {
   require_once 'CRM/Event/Import/Parser.php';
@@ -1240,11 +1250,12 @@ function _civicrm_api3_deprecated_create_participant_formatted($params, $onDupli
 
 /**
  *
- * @param <type> $params
+ * @param array $params
  *
  * @param bool $checkDuplicate
  *
- * @return array|bool <type>
+ * @return array|bool
+ *   <type>
  */
 function _civicrm_api3_deprecated_participant_check_params($params, $checkDuplicate = FALSE) {
 
@@ -1305,7 +1316,7 @@ function _civicrm_api3_deprecated_participant_check_params($params, $checkDuplic
  *   Contact subtype if exists/passed.
  *
  * @return null
  *   on success, error message otherwise
+ *   on success, error message otherwise
  */
 function _civicrm_api3_deprecated_contact_check_custom_params($params, $csType = NULL) {
   empty($csType) ? $onlyParent = TRUE : $onlyParent = FALSE;
@@ -1477,7 +1488,7 @@ function _civicrm_api3_deprecated_contact_check_params(
  * @param int $activityTypeID
  *
  * @return array
  *   <type> $params
+ *   <type> $params
  */
 function _civicrm_api3_deprecated_activity_buildmailparams($result, $activityTypeID) {
   // get ready for collecting data about activity to be created