INFRA-132 - CRM/Core - Misc
[civicrm-core.git] / CRM / Core / BAO / Log.php
index dac5f77e9d8d0e9c32c1ccdb4cd0e4f27dc94d18..e50ec7c58a298025853f76c8bc5ec62c5a892436 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Core_BAO_Log extends CRM_Core_DAO_Log {
   static $_processed = NULL;
 
-  static function &lastModified($id, $table = 'civicrm_contact') {
+  /**
+   * @param int $id
+   * @param string $table
+   *
+   * @return array|null
+   */
+  public static function &lastModified($id, $table = 'civicrm_contact') {
 
     $log = new CRM_Core_DAO_Log();
 
@@ -61,20 +67,28 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log {
   }
 
   /**
-   * add log to civicrm_log table
+   * Add log to civicrm_log table
    *
-   * @param array $params  array of name-value pairs of log table.
+   * @param array $params
+   *   Array of name-value pairs of log table.
    *
    * @static
    */
-  static function add(&$params) {
+  public static function add(&$params) {
 
     $log = new CRM_Core_DAO_Log();
     $log->copyValues($params);
     $log->save();
   }
 
-  static function register($contactID,
+  /**
+   * @param int $contactID
+   * @param string $tableName
+   * @param int $tableID
+   * @param int $userID
+   */
+  static function register(
+    $contactID,
     $tableName,
     $tableID,
     $userID = NULL
@@ -139,17 +153,14 @@ UPDATE civicrm_log
   }
 
   /**
-   * Function to get log record count for a Contact
-   *
-   * @param $contactID
+   * Get log record count for a Contact
    *
-   * @internal param int $contactId Contact ID
+   * @param int $contactID
    *
    * @return int count of log records
-   * @access public
    * @static
    */
-  static function getContactLogCount($contactID) {
+  public static function getContactLogCount($contactID) {
     $query = "SELECT count(*) FROM civicrm_log
                    WHERE civicrm_log.entity_table = 'civicrm_contact' AND civicrm_log.entity_id = {$contactID}";
     return CRM_Core_DAO::singleValueQuery($query);
@@ -160,10 +171,9 @@ UPDATE civicrm_log
    * summary, instead of normal log entries.
    *
    * @return int report id of Contact Logging Report (Summary) / false
-   * @access public
    * @static
    */
-  static function useLoggingReport() {
+  public static function useLoggingReport() {
     // first check if logging is enabled
     $config = CRM_Core_Config::singleton();
     if (!$config->logging) {
@@ -189,4 +199,3 @@ UPDATE civicrm_log
     return FALSE;
   }
 }
-