Merge branch 4.6 into master
[civicrm-core.git] / CRM / Core / BAO / OpenID.php
index 4d421ed0fb4d8f71a1817e1ec532bbf1356b838f..cdc8c60a932d8ff3fd6676e6b8fc0d055542afec 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_Core_BAO_OpenID extends CRM_Core_DAO_OpenID {
 
   /**
-   * Takes an associative array and adds OpenID
+   * Takes an associative array and adds OpenID.
    *
-   * @param array  $params         (reference ) an assoc array of name/value pairs
+   * @param array $params
+   *   (reference ) an assoc array of name/value pairs.
    *
-   * @return object       CRM_Core_BAO_OpenID object on success, null otherwise
-   * @access public
-   * @static
+   * @return object
+   *   CRM_Core_BAO_OpenID object on success, null otherwise
    */
-  static function add(&$params) {
+  public static function add(&$params) {
     $hook = empty($params['id']) ? 'create' : 'edit';
     CRM_Utils_Hook::pre($hook, 'OpenID', CRM_Utils_Array::value('id', $params), $params);
 
@@ -63,26 +63,24 @@ class CRM_Core_BAO_OpenID extends CRM_Core_DAO_OpenID {
    * Given the list of params in the params array, fetch the object
    * and store the values in the values array
    *
-   * @param array $entityBlock   input parameters to find object
+   * @param array $entityBlock
+   *   Input parameters to find object.
    *
    * @return mixed
-   * @access public
-   * @static
    */
-  static function &getValues($entityBlock) {
+  public static function &getValues($entityBlock) {
     return CRM_Core_BAO_Block::getValues('openid', $entityBlock);
   }
 
   /**
-   * Returns whether or not this OpenID is allowed to login
+   * Returns whether or not this OpenID is allowed to login.
    *
-   * @param  string  $identity_url the OpenID to check
+   * @param string $identity_url
+   *   The OpenID to check.
    *
-   * @return boolean
-   * @access public
-   * @static
+   * @return bool
    */
-  static function isAllowedToLogin($identity_url) {
+  public static function isAllowedToLogin($identity_url) {
     $openId = new CRM_Core_DAO_OpenID();
     $openId->openid = $identity_url;
     if ($openId->find(TRUE)) {
@@ -94,15 +92,15 @@ class CRM_Core_BAO_OpenID extends CRM_Core_DAO_OpenID {
   /**
    * Get all the openids for a specified contact_id, with the primary openid being first
    *
-   * @param int $id the contact id
+   * @param int $id
+   *   The contact id.
    *
    * @param bool $updateBlankLocInfo
    *
-   * @return array  the array of openid's
-   * @access public
-   * @static
+   * @return array
+   *   the array of openid's
    */
-  static function allOpenIDs($id, $updateBlankLocInfo = FALSE) {
+  public static function allOpenIDs($id, $updateBlankLocInfo = FALSE) {
     if (!$id) {
       return NULL;
     }
@@ -121,8 +119,8 @@ ORDER BY
     $params = array(1 => array($id, 'Integer'));
 
     $openids = $values = array();
-    $dao     = CRM_Core_DAO::executeQuery($query, $params);
-    $count   = 1;
+    $dao = CRM_Core_DAO::executeQuery($query, $params);
+    $count = 1;
     while ($dao->fetch()) {
       $values = array(
         'locationType' => $dao->locationType,
@@ -144,10 +142,10 @@ ORDER BY
   }
 
   /**
-   * Call common delete function
+   * Call common delete function.
    */
-  static function del($id) {
+  public static function del($id) {
     return CRM_Contact_BAO_Contact::deleteObjectWithPrimary('OpenID', $id);
   }
-}
 
+}