Indentation, whitespace and wrapping.
authorAndreas Hennings <andreas@dqxtech.net>
Tue, 11 Feb 2014 19:35:08 +0000 (20:35 +0100)
committerTim Otten <totten@civicrm.org>
Sat, 3 Jan 2015 21:57:43 +0000 (13:57 -0800)
CRM/Contribute/Page/ContributionPage.php
CRM/Utils/System/Base.php

index 64452f5332b9a390cbe7e3e62a63cc0e275bf86b..a7df6d7ade07e23b7d25a389b0eeb1c11317bc3b 100644 (file)
@@ -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);
index bc4ab498ed6a99f19d47cac90ff4294913b0da92..e26a8569902c0c6bf72557498cae807cc58ccb3d 100644 (file)
@@ -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;