Commit 4f99ca55 authored by totten's avatar totten
Browse files

INFRA-132 - Newline after "{"

parent 9b873358
......@@ -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) {
......
......@@ -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]);
}
}
}
......
......@@ -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);
}
}
}
......
......@@ -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]);
}
}
}
......
......@@ -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.<br />" .
"$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.<br />" .
"$method method is unsupported in legacy payment processors."
);
}
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
}
}
......
......@@ -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;
}
}
}
......@@ -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;
}
}
......
......@@ -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
......
......@@ -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;
}
}
......
......@@ -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__);
}
}
......
......@@ -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;
......
......@@ -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);
......
......@@ -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 = "
......
......@@ -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;
......
......@@ -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+
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment