CRM-15988 - Cleanup internal use of entity names
[civicrm-core.git] / CRM / Core / ScheduledJob.php
index 80f8ecc9999b62266b8698af1e29b08ff449b513..eb320eedffcce05595bb4b57378bcb9e06cda7a1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * This interface defines methods that need to be implemented
@@ -44,16 +44,8 @@ class CRM_Core_ScheduledJob {
 
   var $remarks = array();
 
-  /*
-     * Class constructor
-     *
-     * @param string $namespace namespace prefix for component's files
-     * @access public
-     *
-     */
-
   /**
-   * @param $params
+   * @param array $params
    */
   public function __construct($params) {
     foreach ($params as $name => $param) {
@@ -88,8 +80,8 @@ class CRM_Core_ScheduledJob {
    * @param null $date
    */
   public function saveLastRun($date = NULL) {
-    $dao           = new CRM_Core_DAO_Job();
-    $dao->id       = $this->id;
+    $dao = new CRM_Core_DAO_Job();
+    $dao->id = $this->id;
     $dao->last_run = ($date == NULL) ? CRM_Utils_Date::currentDBDate() : CRM_Utils_Date::currentDBDate($date);
     $dao->save();
   }
@@ -109,7 +101,7 @@ class CRM_Core_ScheduledJob {
         return TRUE;
 
       case 'Hourly':
-        $now     = CRM_Utils_Date::currentDBDate();
+        $now = CRM_Utils_Date::currentDBDate();
         $hourAgo = strtotime('-1 hour', strtotime($now));
         $lastRun = strtotime($this->last_run);
         if ($lastRun < $hourAgo) {
@@ -117,8 +109,8 @@ class CRM_Core_ScheduledJob {
         }
 
       case 'Daily':
-        $now     = CRM_Utils_Date::currentDBDate();
-        $dayAgo  = strtotime('-1 day', strtotime($now));
+        $now = CRM_Utils_Date::currentDBDate();
+        $dayAgo = strtotime('-1 day', strtotime($now));
         $lastRun = strtotime($this->last_run);
         if ($lastRun < $dayAgo) {
           return TRUE;
@@ -128,6 +120,7 @@ class CRM_Core_ScheduledJob {
     return FALSE;
   }
 
-  public function __destruct() {}
-}
+  public function __destruct() {
+  }
 
+}