Merge pull request #4692 from kurund/CRM-14696
[civicrm-core.git] / CRM / Contact / BAO / GroupOrganization.php
index c5db6ed18bf036ecdd8503cba9999826861b283e..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);
@@ -108,7 +108,7 @@ class CRM_Contact_BAO_GroupOrganization extends CRM_Contact_DAO_GroupOrganizatio
   }
 
   /**
-   * @param $groupID
+   * @param int $groupID
    * @param $defaults
    */
   static function retrieve($groupID, &$defaults) {
@@ -123,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
@@ -142,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
    *