a few comment fixes
[civicrm-core.git] / CRM / Core / Session.php
index 0c9133346f0eb6db3d26580141291e5c4b40252d..ba1fe1b2a88bcdcbc342b53e8ff032503b8c857b 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 
 require_once "PEAR.php";
@@ -64,7 +64,6 @@ class CRM_Core_Session {
    * pattern and cache the instance in this variable
    *
    * @var object
-   * @static
    */
   static private $_singleton = NULL;
 
@@ -93,11 +92,10 @@ class CRM_Core_Session {
    * Singleton function used to manage this object
    *
    * @return CRM_Core_Session
-   * @static
    */
   public static function &singleton() {
     if (self::$_singleton === NULL) {
-      self::$_singleton = new CRM_Core_Session;
+      self::$_singleton = new CRM_Core_Session();
     }
     return self::$_singleton;
   }
@@ -125,7 +123,7 @@ class CRM_Core_Session {
         // FIXME: This belongs in CRM_Utils_System_*
         if ($config->userSystem->is_drupal && function_exists('drupal_session_start')) {
           // https://issues.civicrm.org/jira/browse/CRM-14356
-          if (! (isset($GLOBALS['lazy_session']) && $GLOBALS['lazy_session'] == TRUE)) {
+          if (!(isset($GLOBALS['lazy_session']) && $GLOBALS['lazy_session'] == TRUE)) {
             drupal_session_start();
           }
           $_SESSION = array();
@@ -146,7 +144,7 @@ class CRM_Core_Session {
     ) {
       $this->_session[$this->_key] = array();
     }
-    return;
+    return NULL;
   }
 
   /**
@@ -169,7 +167,7 @@ class CRM_Core_Session {
       $this->_session = array();
     }
 
-    return;
+    return NULL;
   }
 
   /**
@@ -262,9 +260,9 @@ class CRM_Core_Session {
    *
    *
    * @param string $name
-   *   name of the variable.
+   *   name of the variable.
    * @param string $prefix
-   *   adds another level of scope to the session.
+   *   adds another level of scope to the session.
    *
    * @return mixed
    */
@@ -327,9 +325,9 @@ class CRM_Core_Session {
    *
    *
    * @param string $name
-   *   name of the timer.
+   *   name of the timer.
    * @param int $expire
-   *   expiry time (in seconds).
+   *   expiry time (in seconds).
    *
    * @return mixed
    */
@@ -489,7 +487,6 @@ class CRM_Core_Session {
    *                 defaults to 10 seconds for most messages, 5 if it has a title but no body,
    *                 or 0 for errors or messages containing links
    *
-   * @static
    *
    * @return void
    */
@@ -557,7 +554,8 @@ class CRM_Core_Session {
 
   /**
    * Retrieve contact id of the logged in user
-   * @return integer|NULL contact ID of logged in user
+   * @return int|NULL
+   *   contact ID of logged in user
    */
   public static function getLoggedInContactID() {
     $session = CRM_Core_Session::singleton();
@@ -576,4 +574,5 @@ class CRM_Core_Session {
     // helps proxies like varnish
     return empty($_SESSION);
   }
+
 }