Merge pull request #4692 from kurund/CRM-14696
[civicrm-core.git] / CRM / Contact / BAO / GroupOrganization.php
index 234c966d8df0c20ed461f77f1903beb3c07725c6..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,7 +123,7 @@ class CRM_Contact_BAO_GroupOrganization extends CRM_Contact_DAO_GroupOrganizatio
   /**
    * Method to check group organization relationship exist
    *
-   * @param  int  $contactId
+   * @param int $contactID
    *
    * @return boolean
    * @access public
@@ -136,12 +140,11 @@ 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
    *
-   * @return $results   no of deleted group organization on success, false otherwise
-   * @access public
+   * @return mixed|null $results   no of deleted group organization on success, false otherwise@access public
    */
   static function deleteGroupOrganization($groupOrganizationID) {
     $results = NULL;