Merge branch 4.6 into master
[civicrm-core.git] / CRM / Core / BAO / OpenID.php
index 5ac7f7038030eaa5fc3904d79444522f19a9760c..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
-   * @static
+   * @return object
+   *   CRM_Core_BAO_OpenID object on success, null otherwise
    */
   public static function add(&$params) {
     $hook = empty($params['id']) ? 'create' : 'edit';
@@ -62,22 +63,22 @@ 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
-   * @static
    */
   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
-   * @static
+   * @return bool
    */
   public static function isAllowedToLogin($identity_url) {
     $openId = new CRM_Core_DAO_OpenID();
@@ -91,12 +92,13 @@ 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
-   * @static
+   * @return array
+   *   the array of openid's
    */
   public static function allOpenIDs($id, $updateBlankLocInfo = FALSE) {
     if (!$id) {
@@ -117,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,
@@ -140,9 +142,10 @@ ORDER BY
   }
 
   /**
-   * Call common delete function
+   * Call common delete function.
    */
   public static function del($id) {
     return CRM_Contact_BAO_Contact::deleteObjectWithPrimary('OpenID', $id);
   }
+
 }