From 58f6c2724c86e952cf12b49d77389a8abd37e50d Mon Sep 17 00:00:00 2001 From: sunil Date: Mon, 9 Feb 2015 21:57:34 +0530 Subject: [PATCH] CRM-14974 , worked on coding standard --- CRM/Core/BAO/Setting.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CRM/Core/BAO/Setting.php b/CRM/Core/BAO/Setting.php index 3fbe429608..c8cfb25d29 100644 --- a/CRM/Core/BAO/Setting.php +++ b/CRM/Core/BAO/Setting.php @@ -230,7 +230,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { $override_group = array(); if (NULL !== ($override = self::getOverride($group, $name, NULL))) { - if ( isset($name) ) { + if (isset($name)) { return $override; } else { @@ -243,10 +243,10 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { } $cacheKey = self::inCache($group, $name, $componentID, $contactID, TRUE, $domainID); - if ( $group && !isset($name) && $cacheKey) { + if ($group && !isset($name) && $cacheKey) { // check value against the cache, and unset key if values are different - $valueDifference = array_diff($override_group, self::$_cache[$cacheKey] ); - if ( !empty($valueDifference)) { + $valueDifference = array_diff($override_group, self::$_cache[$cacheKey]); + if (!empty($valueDifference)) { $cacheKey = ''; } } @@ -269,13 +269,13 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting { } $dao->free(); - if ( ! isset($name) ) { + if (!isset($name)) { // merge db and override group values - /* When no $name is present, the getItem() function should return an array - consisting of the sum of all override settings + all settings present in - the database for the given $group (with the overrides taking precedence, - and applying even if the setting is not defined in the database). - */ + // When no $name is present, the getItem() function should return an array + // consisting of the sum of all override settings + all settings present in + // the database for the given $group (with the overrides taking precedence, + // and applying even if the setting is not defined in the database). + // $values = array_merge($values, $override_group); } @@ -1126,7 +1126,7 @@ AND domain_id = %3 if ($group && $name && isset($civicrm_setting[$group][$name])) { return $civicrm_setting[$group][$name]; } - else if ($group && !isset($name) && isset($civicrm_setting[$group])) { + elseif ($group && !isset($name) && isset($civicrm_setting[$group])) { return $civicrm_setting[$group]; } else { -- 2.25.1