From 8b647c3a4d0d835ab7c6043a312fa08102dc6964 Mon Sep 17 00:00:00 2001 From: Andreas Hennings Date: Tue, 11 Feb 2014 20:35:08 +0100 Subject: [PATCH] Indentation, whitespace and wrapping. --- CRM/Contribute/Page/ContributionPage.php | 24 +++++++++++------------- CRM/Utils/System/Base.php | 8 ++++---- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CRM/Contribute/Page/ContributionPage.php b/CRM/Contribute/Page/ContributionPage.php index 64452f5332..a7df6d7ade 100644 --- a/CRM/Contribute/Page/ContributionPage.php +++ b/CRM/Contribute/Page/ContributionPage.php @@ -581,7 +581,7 @@ ORDER BY title asc } } - $value = $this->get( 'financial_type_id' ); + $value = $this->get( 'financial_type_id' ); $val = array(); if ($value) { if (is_array($value)) { @@ -593,12 +593,10 @@ ORDER BY title asc $type = implode(',', $val); } // @todo Variable 'type' might not have been defined. - $clauses[] = "financial_type_id IN ({$type})"; + $clauses[] = "financial_type_id IN ({$type})"; } - if ($sortBy && - $this->_sortByCharacter !== NULL - ) { + if ($sortBy && $this->_sortByCharacter !== NULL) { $clauses[] = "title LIKE '" . strtolower(CRM_Core_DAO::escapeWildCardString($this->_sortByCharacter)) . "%'"; } @@ -641,8 +639,8 @@ ORDER BY title asc $query = " SELECT count(id) - FROM civicrm_contribution_page - WHERE $whereClause"; +FROM civicrm_contribution_page +WHERE $whereClause"; $params['total'] = CRM_Core_DAO::singleValueQuery($query, $whereParams); @@ -657,10 +655,10 @@ SELECT count(id) public function pagerAtoZ($whereClause, $whereParams) { $query = " - SELECT DISTINCT UPPER(LEFT(title, 1)) as sort_name - FROM civicrm_contribution_page - WHERE $whereClause - ORDER BY LEFT(title, 1) +SELECT DISTINCT UPPER(LEFT(title, 1)) as sort_name +FROM civicrm_contribution_page +WHERE $whereClause +ORDER BY LEFT(title, 1) "; $dao = CRM_Core_DAO::executeQuery($query, $whereParams); @@ -669,12 +667,12 @@ SELECT count(id) } /** - * @param $sectionsInfo + * @param array $sectionsInfo * * @return array */ public function formatConfigureLinks($sectionsInfo) { - //build the formatted configure links. + // build the formatted configure links. $formattedConfLinks = self::configureActionLinks(); foreach ($formattedConfLinks as $act => & $link) { $sectionName = CRM_Utils_Array::value('uniqueName', $link); diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index bc4ab498ed..e26a856990 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -249,18 +249,18 @@ abstract class CRM_Utils_System_Base { */ public function getTimeZoneOffset(){ $timezone = $this->getTimeZoneString(); - if($timezone){ + if ($timezone) { $tzObj = new DateTimeZone($timezone); $dateTime = new DateTime("now", $tzObj); $tz = $tzObj->getOffset($dateTime); - if(empty($tz)){ - return false; + if (empty($tz)) { + return FALSE; } $timeZoneOffset = sprintf("%02d:%02d", $tz / 3600, abs(($tz/60)%60)); - if($timeZoneOffset > 0){ + if ($timeZoneOffset > 0) { $timeZoneOffset = '+' . $timeZoneOffset; } return $timeZoneOffset; -- 2.25.1