Merge pull request #5449 from pratikshad/fixedWebtest4.6
[civicrm-core.git] / CRM / Core / BAO / UFMatch.php
index 6c2cb5476f8ea97fb302b7c42c1300356921b242..d0fb614a30b679dd84dfb9cdc2f5b1c3df557526 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        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  */
 class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch {
 
-  /*
+  /**
    * Create UF Match, Note that thsi function is here in it's simplest form @ the moment
    *
+   * @param $params
    *
-   * @param array $params
-   *   Input parameters.
-   */
-  /**
-   * @param array $params
-   *
-   * @return CRM_Core_DAO_UFMatch
+   * @return \CRM_Core_DAO_UFMatch
    */
   public static function create($params) {
     $hook = empty($params['id']) ? 'create' : 'edit';
@@ -79,7 +74,6 @@ class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch {
    * @param bool $isLogin
    *
    * @return void
-   * @static
    */
   public static function synchronize(&$user, $update, $uf, $ctype, $isLogin = FALSE) {
     $userSystem = CRM_Core_Config::singleton()->userSystem;
@@ -150,8 +144,8 @@ class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch {
 
     // add current contact to recently viewed
     if ($ufmatch->contact_id) {
-      list($displayName, $contactImage, $contactType, $contactSubtype, $contactImageUrl) =
-        CRM_Contact_BAO_Contact::getDisplayAndImage($ufmatch->contact_id, TRUE, TRUE);
+      list($displayName, $contactImage, $contactType, $contactSubtype, $contactImageUrl)
+        CRM_Contact_BAO_Contact::getDisplayAndImage($ufmatch->contact_id, TRUE, TRUE);
 
       $otherRecent = array(
         'imageUrl' => $contactImageUrl,
@@ -189,7 +183,6 @@ class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch {
    * @param bool $isLogin
    *
    * @return CRM_Core_DAO_UFMatch|bool
-   * @static
    */
   public static function &synchronizeUFMatch(&$user, $userKey, $uniqId, $uf, $status = NULL, $ctype = NULL, $isLogin = FALSE) {
     $config = CRM_Core_Config::singleton();
@@ -363,13 +356,12 @@ AND    domain_id    = %4
   }
 
   /**
-   * Update the uf_name in the user object
+   * Update the uf_name in the user object.
    *
    * @param int $contactId
    *   Id of the contact to update.
    *
    * @return void
-   * @static
    */
   public static function updateUFName($contactId) {
     if (!$contactId) {
@@ -417,7 +409,7 @@ AND    domain_id    = %4
   }
 
   /**
-   * Update the email value for the contact and user profile
+   * Update the email value for the contact and user profile.
    *
    * @param int $contactId
    *   Contact ID of the user.
@@ -425,7 +417,6 @@ AND    domain_id    = %4
    *   Email to be modified for the user.
    *
    * @return void
-   * @static
    */
   public static function updateContactEmail($contactId, $emailAddress) {
     $strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower';
@@ -474,13 +465,12 @@ AND    domain_id    = %4
   }
 
   /**
-   * Delete the object records that are associated with this cms user
+   * Delete the object records that are associated with this cms user.
    *
    * @param int $ufID
    *   Id of the user to delete.
    *
    * @return void
-   * @static
    */
   public static function deleteUser($ufID) {
     $ufmatch = new CRM_Core_DAO_UFMatch();
@@ -491,14 +481,13 @@ AND    domain_id    = %4
   }
 
   /**
-   * Get the contact_id given a uf_id
+   * Get the contact_id given a uf_id.
    *
    * @param int $ufID
    *   Id of UF for which related contact_id is required.
    *
    * @return int
    *   contact_id on success, null otherwise
-   * @static
    */
   public static function getContactId($ufID) {
     if (!isset($ufID)) {
@@ -516,14 +505,13 @@ AND    domain_id    = %4
   }
 
   /**
-   * Get the uf_id given a contact_id
+   * Get the uf_id given a contact_id.
    *
    * @param int $contactID
    *   ID of the contact for which related uf_id is required.
    *
    * @return int
    *   uf_id of the given contact_id on success, null otherwise
-   * @static
    */
   public static function getUFId($contactID) {
     if (!isset($contactID)) {
@@ -549,12 +537,11 @@ AND    domain_id    = %4
   }
 
   /**
-   * Get the list of contact_id
+   * Get the list of contact_id.
    *
    *
    * @return int
    *   contact_id on success, null otherwise
-   * @static
    */
   public static function getContactIDs() {
     $id = array();
@@ -574,7 +561,6 @@ AND    domain_id    = %4
    *
    * @return bool
    *   true if allowed to login, false otherwise
-   * @static
    */
   public static function getAllowedToLogin($openId) {
     $ufmatch = new CRM_Core_DAO_UFMatch();
@@ -593,7 +579,6 @@ AND    domain_id    = %4
    *
    * @return int
    *   next highest unused value for uf_id
-   * @static
    */
   public static function getNextUfIdValue() {
     $query = "SELECT MAX(uf_id)+1 AS next_uf_id FROM civicrm_uf_match";
@@ -632,10 +617,8 @@ AND    domain_id    = %4
    * @param int $ufID
    *   Uf id.
    *
-   * return array  $ufValues uf values.
-   * *
-   *
    * @return array
+   *   uf values.
    */
   public static function getUFValues($ufID = NULL) {
     if (!$ufID) {
@@ -662,4 +645,5 @@ AND    domain_id    = %4
     }
     return $ufValues[$ufID];
   }
+
 }