Merge pull request #4692 from kurund/CRM-14696
[civicrm-core.git] / CRM / Contact / BAO / GroupOrganization.php
index 93f74806451b1d86339b619da6002294d9daa39f..160fa60ca21caf958b18f1d70bba8b303984e9fd 100644 (file)
 class CRM_Contact_BAO_GroupOrganization extends CRM_Contact_DAO_GroupOrganization {
 
   /**
-   * class constructor
+   * Class constructor
    */
   function __construct() {
     parent::__construct();
   }
 
   /**
-   * takes an associative array and creates a groupOrganization object
+   * Takes an associative array and creates a groupOrganization object
    *
    * @param array  $params         (reference ) an assoc array of name/value pairs
    *
-   * @return void
+   * @return CRM_Contact_DAO_GroupOrganization
    * @access public
    * @static
    */
   static function add(&$params) {
-    $formatedValues = array();
-    self::formatValues($params, $formatedValues);
-    $dataExists = self::dataExists($formatedValues);
+    $formattedValues = array();
+    self::formatValues($params, $formattedValues);
+    $dataExists = self::dataExists($formattedValues);
     if (!$dataExists) {
       return NULL;
     }
     $groupOrganization = new CRM_Contact_DAO_GroupOrganization();
-    $groupOrganization->copyValues($formatedValues);
+    $groupOrganization->copyValues($formattedValues);
     // we have ensured we have group_id & organization_id so we can do a find knowing that
     // this can only find a matching record
     $groupOrganization->find(TRUE);
@@ -107,6 +107,10 @@ class CRM_Contact_BAO_GroupOrganization extends CRM_Contact_DAO_GroupOrganizatio
     return FALSE;
   }
 
+  /**
+   * @param int $groupID
+   * @param $defaults
+   */
   static function retrieve($groupID, &$defaults) {
     $dao = new CRM_Contact_DAO_GroupOrganization();
     $dao->group_id = $groupID;
@@ -119,9 +123,7 @@ class CRM_Contact_BAO_GroupOrganization extends CRM_Contact_DAO_GroupOrganizatio
   /**
    * Method to check group organization relationship exist
    *
-   * @param $contactID
-   *
-   * @internal param int $contactId
+   * @param int $contactID
    *
    * @return boolean
    * @access public
@@ -138,7 +140,7 @@ class CRM_Contact_BAO_GroupOrganization extends CRM_Contact_DAO_GroupOrganizatio
   }
 
   /**
-   * Function to delete Group Organization
+   * Delete Group Organization
    *
    * @param int $groupOrganizationID group organization id that needs to be deleted
    *