INFRA-132 - Change "else if" to "elseif"
[civicrm-core.git] / CRM / Logging / Differ.php
index 7578821d2ce21ee4855ba0c44ed42d7daeb14146..f75b638394b22ca4693fd76730109b0c5d0465eb 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -39,11 +39,11 @@ class CRM_Logging_Differ {
   private $interval;
 
   /**
-   * @param $log_conn_id
+   * @param int $log_conn_id
    * @param $log_date
    * @param string $interval
    */
-  function __construct($log_conn_id, $log_date, $interval = '10 SECOND') {
+  public function __construct($log_conn_id, $log_date, $interval = '10 SECOND') {
     $dsn               = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN);
     $this->db          = $dsn['database'];
     $this->log_conn_id = $log_conn_id;
@@ -56,7 +56,7 @@ class CRM_Logging_Differ {
    *
    * @return array
    */
-  function diffsInTables($tables) {
+  public function diffsInTables($tables) {
     $diffs = array();
     foreach ($tables as $table) {
       $diff = $this->diffsInTable($table);
@@ -69,11 +69,11 @@ class CRM_Logging_Differ {
 
   /**
    * @param $table
-   * @param null $contactID
+   * @param int $contactID
    *
    * @return array
    */
-  function diffsInTable($table, $contactID = null) {
+  public function diffsInTable($table, $contactID = null) {
     $diffs = array();
 
     $params = array(
@@ -152,7 +152,7 @@ WHERE lt.log_conn_id = %1 AND
 
   /**
    * @param $table
-   * @param $id
+   * @param int $id
    *
    * @return array
    */
@@ -244,7 +244,7 @@ WHERE lt.log_conn_id = %1 AND
    *
    * @return array
    */
-  function titlesAndValuesForTable($table) {
+  public function titlesAndValuesForTable($table) {
     // static caches for subsequent calls with the same $table
     static $titles = array();
     static $values = array();
@@ -313,7 +313,8 @@ WHERE lt.log_conn_id = %1 AND
       }
       elseif (substr($table, 0, 14) == 'civicrm_value_') {
         list($titles[$table], $values[$table]) = $this->titlesAndValuesForCustomDataTable($table);
-      } else {
+      }
+      else {
         $titles[$table] = $values[$table] = array();
       }
     }
@@ -323,7 +324,7 @@ WHERE lt.log_conn_id = %1 AND
 
   /**
    * @param $sql
-   * @param $params
+   * @param array $params
    *
    * @return mixed
    */
@@ -393,4 +394,3 @@ ORDER BY log_date
     return array($titles, $values);
   }
 }
-