From: Tim Otten Date: Wed, 7 Jan 2015 04:01:33 +0000 (-0800) Subject: INFRA-132 - Newline after "{" X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f99ca551bc52520216559a918d84915fc992338;p=civicrm-core.git INFRA-132 - Newline after "{" --- diff --git a/CRM/Admin/Form/ParticipantStatusType.php b/CRM/Admin/Form/ParticipantStatusType.php index cf98aa92fb..4fcd2d8470 100644 --- a/CRM/Admin/Form/ParticipantStatusType.php +++ b/CRM/Admin/Form/ParticipantStatusType.php @@ -99,7 +99,8 @@ class CRM_Admin_Form_ParticipantStatusType extends CRM_Admin_Form { ); // make sure a malicious POST does not change these on reserved statuses - if ($this->_isReserved) { unset($params['name'], $params['class'], $params['is_active']); + if ($this->_isReserved) { + unset($params['name'], $params['class'], $params['is_active']); } if ($this->_action & CRM_Core_Action::UPDATE) { diff --git a/CRM/Campaign/BAO/Query.php b/CRM/Campaign/BAO/Query.php index feae5e93af..9b8fbe7596 100755 --- a/CRM/Campaign/BAO/Query.php +++ b/CRM/Campaign/BAO/Query.php @@ -589,7 +589,8 @@ INNER JOIN civicrm_custom_group grp on fld.custom_group_id = grp.id foreach (array( 'current_campaign', 'past_campaign') as $ignore) { $index = array_search($ignore, $campaign); - if ($index !== FALSE) { unset($campaign[$index]); + if ($index !== FALSE) { + unset($campaign[$index]); } } } diff --git a/CRM/Core/BAO/Address.php b/CRM/Core/BAO/Address.php index d78f98b9b6..c74aa7a073 100644 --- a/CRM/Core/BAO/Address.php +++ b/CRM/Core/BAO/Address.php @@ -498,7 +498,8 @@ class CRM_Core_BAO_Address extends CRM_Core_DAO_Address { if ($count > 1) { foreach (array( 'state', 'state_name', 'country', 'world_region') as $fld) { - if (isset($address->$fld)) { unset($address->$fld); + if (isset($address->$fld)) { + unset($address->$fld); } } } diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index 804aeeab4d..370e9fdd4b 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -242,7 +242,8 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup { if ($considerSelector) { // drop the fields not meant for the selector foreach ($subset as $name => $field) { - if (!$field['in_selector']) { unset($subset[$name]); + if (!$field['in_selector']) { + unset($subset[$name]); } } } diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index 7345ab67bf..70c025d946 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -596,9 +596,10 @@ abstract class CRM_Core_Payment { $extension_instance_found = TRUE; } - if (!$extension_instance_found) { CRM_Core_Error::fatal( - "No extension instances of the '{$params['processor_name']}' payment processor were found.
" . - "$method method is unsupported in legacy payment processors." + if (!$extension_instance_found) { + CRM_Core_Error::fatal( + "No extension instances of the '{$params['processor_name']}' payment processor were found.
" . + "$method method is unsupported in legacy payment processors." ); } diff --git a/CRM/Core/Region.php b/CRM/Core/Region.php index 8ba4f7faa2..a0efabc4eb 100644 --- a/CRM/Core/Region.php +++ b/CRM/Core/Region.php @@ -233,14 +233,18 @@ class CRM_Core_Region { * @return int */ public static function _cmpSnippet($a, $b) { - if ($a['weight'] < $b['weight']) { return -1; + if ($a['weight'] < $b['weight']) { + return -1; } - if ($a['weight'] > $b['weight']) { return 1; + if ($a['weight'] > $b['weight']) { + return 1; } // fallback to name sort; don't really want to do this, but it makes results more stable - if ($a['name'] < $b['name']) { return -1; + if ($a['name'] < $b['name']) { + return -1; } - if ($a['name'] > $b['name']) { return 1; + if ($a['name'] > $b['name']) { + return 1; } return 0; } diff --git a/CRM/Core/Smarty/plugins/block.crmRegion.php b/CRM/Core/Smarty/plugins/block.crmRegion.php index 23166b3438..b625a61c74 100644 --- a/CRM/Core/Smarty/plugins/block.crmRegion.php +++ b/CRM/Core/Smarty/plugins/block.crmRegion.php @@ -18,7 +18,8 @@ */ function smarty_block_crmRegion($params, $content, &$smarty, &$repeat) { - if ($repeat) { return; + if ($repeat) { + return; } require_once 'CRM/Core/Region.php'; $region = CRM_Core_Region::instance($params['name'], FALSE); diff --git a/CRM/Core/Smarty/plugins/modifier.mb_truncate.php b/CRM/Core/Smarty/plugins/modifier.mb_truncate.php index 05ec0a4166..8d8e3e56c2 100644 --- a/CRM/Core/Smarty/plugins/modifier.mb_truncate.php +++ b/CRM/Core/Smarty/plugins/modifier.mb_truncate.php @@ -84,7 +84,8 @@ function smarty_modifier_mb_truncate($string, $length = 80, $etc = '...', return $substr($string, 0, $length) . $etc; } - else { return $string; + else { + return $string; } } diff --git a/CRM/Event/Cart/BAO/EventInCart.php b/CRM/Event/Cart/BAO/EventInCart.php index 9b375887be..b786cbe20a 100644 --- a/CRM/Event/Cart/BAO/EventInCart.php +++ b/CRM/Event/Cart/BAO/EventInCart.php @@ -317,7 +317,8 @@ class CRM_Event_Cart_BAO_EventInCart extends CRM_Event_Cart_DAO_EventInCart impl if ($parent_event_id == NULL) { return $this->event->parent_event_id; } - else { return $this->event->parent_event_id == $parent_event_id; + else { + return $this->event->parent_event_id == $parent_event_id; } } } diff --git a/CRM/Event/Cart/Form/Cart.php b/CRM/Event/Cart/Form/Cart.php index 58316bfef7..ef67dbfb8d 100644 --- a/CRM/Event/Cart/Form/Cart.php +++ b/CRM/Event/Cart/Form/Cart.php @@ -136,7 +136,8 @@ class CRM_Event_Cart_Form_Cart extends CRM_Core_Form { if (is_array($ids)) { return array_pop($ids); } - else { return NULL; + else { + return NULL; } } diff --git a/CRM/Event/Form/ManageEvent/Fee.php b/CRM/Event/Form/ManageEvent/Fee.php index 94965bf0b8..4eada5b45b 100644 --- a/CRM/Event/Form/ManageEvent/Fee.php +++ b/CRM/Event/Form/ManageEvent/Fee.php @@ -445,11 +445,12 @@ class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent { } } - foreach ($occurDiscount as $key => $value) { if ($value > 1 && $key <> '') { + foreach ($occurDiscount as $key => $value) { + if ($value > 1 && $key <> '') { if ($key == $values['discount_name'][$i]) { $errors['discount_name[' . $i . ']'] = ts('%1 is already used for Discount Name.', array(1 => $key)); } - } + } } //validation for discount labels and values diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index 92bb3c205d..15c79e0b8f 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -793,7 +793,8 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent continue 2; } } - if ($complete) { return 1; + if ($complete) { + return 1; } } diff --git a/CRM/Extension/Manager/Payment.php b/CRM/Extension/Manager/Payment.php index 251e48e29c..92bfff20f7 100644 --- a/CRM/Extension/Manager/Payment.php +++ b/CRM/Extension/Manager/Payment.php @@ -256,7 +256,8 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base { 'payment_type' => $dao->payment_type, ); } - else { CRM_Core_Error::fatal("Unable to find payment processor in " . __CLASS__ . '::' . __METHOD__); + else { + CRM_Core_Error::fatal("Unable to find payment processor in " . __CLASS__ . '::' . __METHOD__); } } diff --git a/CRM/Price/BAO/PriceFieldValue.php b/CRM/Price/BAO/PriceFieldValue.php index 05404c1f18..a457e0beec 100644 --- a/CRM/Price/BAO/PriceFieldValue.php +++ b/CRM/Price/BAO/PriceFieldValue.php @@ -89,7 +89,8 @@ class CRM_Price_BAO_PriceFieldValue extends CRM_Price_DAO_PriceFieldValue { } if ($id && !empty($params['weight'])) { - if (isset($params['name'])) { unset($params['name']); + if (isset($params['name'])) { + unset($params['name']); } $oldWeight = NULL; diff --git a/CRM/Price/Form/Set.php b/CRM/Price/Form/Set.php index e8261fac68..5bcc4d664e 100644 --- a/CRM/Price/Form/Set.php +++ b/CRM/Price/Form/Set.php @@ -272,8 +272,10 @@ class CRM_Price_Form_Set extends CRM_Core_Form { $compIds = array(); $extends = CRM_Utils_Array::value('extends', $params); if (is_array($extends)) { - foreach ($extends as $compId => $selected) { if ($selected) { $compIds[] = $compId; - } + foreach ($extends as $compId => $selected) { + if ($selected) { + $compIds[] = $compId; + } } } $params['extends'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, $compIds); diff --git a/CRM/Report/Utils/Report.php b/CRM/Report/Utils/Report.php index 5cbf13d54f..765bb47271 100644 --- a/CRM/Report/Utils/Report.php +++ b/CRM/Report/Utils/Report.php @@ -162,7 +162,8 @@ WHERE TRIM(BOTH '/' FROM CONCAT(report_id, '/', name)) = %1"; * @return int|null|string */ public static function getInstanceCount($optionVal) { - if (empty($optionVal)) { return 0; + if (empty($optionVal)) { + return 0; } $sql = " diff --git a/CRM/Upgrade/Snapshot/V4p2/Price/BAO/FieldValue.php b/CRM/Upgrade/Snapshot/V4p2/Price/BAO/FieldValue.php index 9eee0fe704..31cfd66b8f 100644 --- a/CRM/Upgrade/Snapshot/V4p2/Price/BAO/FieldValue.php +++ b/CRM/Upgrade/Snapshot/V4p2/Price/BAO/FieldValue.php @@ -86,7 +86,8 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_FieldValue extends CRM_Upgrade_Snapsho } if ($id = CRM_Utils_Array::value('id', $ids)) { - if (isset($params['name'])) { unset($params['name']); + if (isset($params['name'])) { + unset($params['name']); } $oldWeight = NULL; diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index 9d999fa346..dabd4f59aa 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -541,7 +541,8 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base { } } else { - if (!JUserHelper::verifyPassword($password, $dbPassword, $dbId)) { return FALSE; + if (!JUserHelper::verifyPassword($password, $dbPassword, $dbId)) { + return FALSE; } //include additional files required by Joomla 3.2.1+ diff --git a/api/v3/Contact.php b/api/v3/Contact.php index 8513bcd3ce..d960023fcc 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -254,7 +254,8 @@ function _civicrm_api3_contact_get_supportanomalies(&$params, &$options) { if (is_array($params['filter.group_id'])) { $groups = $params['filter.group_id']; } - else { $groups = explode(',', $params['filter.group_id']); + else { + $groups = explode(',', $params['filter.group_id']); } unset($params['filter.group_id']); $groups = array_flip($groups); diff --git a/bin/cli.class.php b/bin/cli.class.php index 78988649b4..d64802efb5 100644 --- a/bin/cli.class.php +++ b/bin/cli.class.php @@ -397,7 +397,8 @@ class civicrm_cli_csv_file extends civicrm_cli { $this->header = $header; while (($data = fgetcsv($handle, 0, $this->separator)) !== FALSE) { // skip blank lines - if (count($data) == 1 && is_null($data[0])) { continue; + if (count($data) == 1 && is_null($data[0])) { + continue; } $this->row++; $params = $this->convertLine($data); diff --git a/install/index.php b/install/index.php index 1ea38db3a2..55028d6c45 100644 --- a/install/index.php +++ b/install/index.php @@ -130,7 +130,8 @@ foreach ($langs as $locale => $_) { if ($locale == 'en_US') { continue; } - if (!file_exists(implode(CIVICRM_DIRECTORY_SEPARATOR, array($crmPath, 'sql', "civicrm_data.$locale.mysql")))) { unset($langs[$locale]); + if (!file_exists(implode(CIVICRM_DIRECTORY_SEPARATOR, array($crmPath, 'sql', "civicrm_data.$locale.mysql")))) { + unset($langs[$locale]); } } diff --git a/tests/phpunit/CRM/Contact/BAO/GroupContactTest.php b/tests/phpunit/CRM/Contact/BAO/GroupContactTest.php index 35a966b168..079966203a 100644 --- a/tests/phpunit/CRM/Contact/BAO/GroupContactTest.php +++ b/tests/phpunit/CRM/Contact/BAO/GroupContactTest.php @@ -63,11 +63,13 @@ class CRM_Contact_BAO_GroupContactTest extends CiviUnitTestCase { $groupContacts = CRM_Core_DAO::createTestObject('CRM_Contact_DAO_GroupContact', NULL, 10); //check the group contact id is not null for each of them - foreach ($groupContacts as $gc) { $this->assertNotNull($gc->id); + foreach ($groupContacts as $gc) { + $this->assertNotNull($gc->id); } //cleanup - foreach ($groupContacts as $gc) { $gc->deleteTestObjects('CRM_Contact_DAO_GroupContact'); + foreach ($groupContacts as $gc) { + $gc->deleteTestObjects('CRM_Contact_DAO_GroupContact'); } }