Merge branch 4.5 into 4.6
[civicrm-core.git] / CRM / Utils / Sort.php
index 978bbbb5a0cad0b80b46226bb141ee8d97d2ce1a..84a1d29b7f294e710dc6e4600ecbf91a9a055fd3 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -122,7 +122,6 @@ class CRM_Utils_Sort {
    *   Order to sort.
    *
    * @return \CRM_Utils_Sort
-   * @access public
    */
   public function __construct(&$vars, $defaultSortOrder = NULL) {
     $this->_vars = array();
@@ -147,7 +146,7 @@ class CRM_Utils_Sort {
   }
 
   /**
-   * Function returns the string for the order by clause
+   * Function returns the string for the order by clause.
    *
    * @return string
    *   the order by clause
@@ -170,7 +169,7 @@ class CRM_Utils_Sort {
   }
 
   /**
-   * Create the sortID string to be used in the GET param
+   * Create the sortID string to be used in the GET param.
    *
    * @param int $index
    *   The field index.
@@ -179,19 +178,18 @@ class CRM_Utils_Sort {
    *
    * @return string
    *   the string to append to the url
-   * @static
    */
   public static function sortIDValue($index, $dir) {
     return ($dir == self::DESCENDING) ? $index . '_d' : $index . '_u';
   }
 
   /**
-   * Init the sort ID values in the object
+   * Init the sort ID values in the object.
    *
    * @param string $defaultSortOrder
    *   The sort order to use by default.
    *
-   * @return returns null if $url- (sort url) is not found
+   * @return void
    */
   public function initSortID($defaultSortOrder) {
     $url = CRM_Utils_Array::value(self::SORT_ID, $_GET, $defaultSortOrder);
@@ -223,7 +221,7 @@ class CRM_Utils_Sort {
   }
 
   /**
-   * Init the object
+   * Init the object.
    *
    * @param string $defaultSortOrder
    *   The sort order to use by default.
@@ -259,7 +257,7 @@ class CRM_Utils_Sort {
   }
 
   /**
-   * Getter for currentSortID
+   * Getter for currentSortID.
    *
    * @return int
    *   returns of the current sort id
@@ -270,7 +268,7 @@ class CRM_Utils_Sort {
   }
 
   /**
-   * Getter for currentSortDirection
+   * Getter for currentSortDirection.
    *
    * @return int
    *   returns of the current sort direction
@@ -305,4 +303,5 @@ class CRM_Utils_Sort {
     // however, as I understand we don't want equality here:
     return -1;
   }
+
 }