clean up changes for batch 18
[civicrm-core.git] / CRM / Contact / Page / View / GroupContact.php
index 32ae9d45e53ba8d6c2d14bc5c4b7f85a3558a716..7df74a3ba9ed8c13d9ca9e5e7038bf9d2a54f5a2 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page {
 
   /**
-   * This function is called when action is browse
+   * called when action is browse
    *
-   * return null
-   * @access public
    */
-  function browse() {
+  public function browse() {
 
     $count = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, NULL, NULL, TRUE);
 
-    $in      = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Added');
+    $in = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Added');
     $pending = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Pending');
-    $out     = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Removed');
+    $out = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Removed');
 
     // keep track of all 'added' contact groups so we can remove them from the smart group
     // section
@@ -71,16 +69,12 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page {
   }
 
   /**
-   * This function is called when action is update
+   * called when action is update
    *
-   * @param null $groupId
+   * @param int $groupId
    *
-   * @internal param int $groupID group id
-   *
-   * return null
-   * @access public
    */
-  function edit($groupId = NULL) {
+  public function edit($groupId = NULL) {
     $controller = new CRM_Core_Controller_Simple(
       'CRM_Contact_Form_GroupContact',
       ts('Contact\'s Groups'),
@@ -107,7 +101,7 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page {
     $controller->run();
   }
 
-  function preProcess() {
+  public function preProcess() {
     $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
     $this->assign('contactId', $this->_contactId);
 
@@ -119,14 +113,13 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page {
   }
 
   /**
-   * This function is the main function that is called
+   * the main function that is called
    * when the page loads, it decides the which action has
    * to be taken for the page.
    *
-   * return null
-   * @access public
+   * @return null
    */
-  function run() {
+  public function run() {
     $this->preProcess();
 
     $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId);
@@ -148,17 +141,19 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page {
   }
 
   /**
-   * function to remove/ rejoin the group
+   * Remove/ rejoin the group
    *
-   * @param int $groupContactId id of crm_group_contact
-   * @param string $status this is the status that should be updated.
+   * @param int $groupContactId
+   *   Id of crm_group_contact.
+   * @param string $status
+   *   This is the status that should be updated.
    *
    * $access public
-   * @param $contactID
+   * @param int $contactID
    *
    * @return bool
    */
-  static function del($groupContactId, $status, $contactID) {
+  public static function del($groupContactId, $status, $contactID) {
     $groupId = CRM_Contact_BAO_GroupContact::getGroupId($groupContactId);
 
     switch ($status) {
@@ -179,8 +174,7 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page {
         break;
     }
 
-    $groupNum =
-      CRM_Contact_BAO_GroupContact::getContactGroup($contactID, 'Added', NULL, TRUE, TRUE);
+    $groupNum = CRM_Contact_BAO_GroupContact::getContactGroup($contactID, 'Added', NULL, TRUE, TRUE);
     if ($groupNum == 1 &&
       $groupStatus == 'Removed' &&
       CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME,
@@ -204,4 +198,3 @@ class CRM_Contact_Page_View_GroupContact extends CRM_Core_Page {
     CRM_Contact_BAO_GroupContact::removeContactsFromGroup($ids, $groupId, $method, $groupStatus);
   }
 }
-