INFRA-132 - s/array (/array(/
[civicrm-core.git] / CRM / Contact / Form / Domain.php
index 801c555d85b1263828f6fbdd75557c5010e5ff06..5978859faf604a9e0b7a302c937a0abdcc6b03fc 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 class CRM_Contact_Form_Domain extends CRM_Core_Form {
 
   /**
-   * the group id, used when editing a group
+   * The group id, used when editing a group
    *
    * @var int
    */
   protected $_id;
 
   /**
-   * the contact_id of domain
+   * The contact_id of domain
    *
    * @var int
    */
   protected $_contactId;
 
   /**
-   * default from email address option value id.
+   * Default from email address option value id.
    *
    * @var int
    */
   protected $_fromEmailId = NULL;
 
   /**
-   * default location type fields
+   * Default location type fields
    *
    * @var array
    */
   protected $_locationDefaults = array();
 
   /**
-   * how many locationBlocks should we display?
+   * How many locationBlocks should we display?
    *
    * @var int
    * @const
    */
-  CONST LOCATION_BLOCKS = 1;
+  const LOCATION_BLOCKS = 1;
 
-  function preProcess() {
+  public function preProcess() {
     CRM_Utils_System::setTitle(ts('Organization Address and Contact Info'));
     $breadCrumbPath = CRM_Utils_System::url('civicrm/admin', 'reset=1');
     CRM_Utils_System::appendBreadCrumb(ts('Administer CiviCRM'), $breadCrumbPath);
@@ -91,10 +91,9 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
   }
 
   /*
-   * This function sets the default values for the form.
+   * Set default values for the form.
    * the default values are retrieved from the database
    *
-   * @access public
    * @return void
    */
   /**
@@ -109,7 +108,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
   /**
    * @return array
    */
-  function setDefaultValues() {
+  public function setDefaultValues() {
     $defaults  = array();
     $params    = array();
 
@@ -150,10 +149,9 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
   }
 
   /**
-   * Function to actually build the form
+   * Build the form object
    *
    * @return void
-   * @access public
    */
   public function buildQuickForm() {
 
@@ -190,24 +188,23 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
   /**
    * Add local and global form rules
    *
-   * @access protected
    *
    * @return void
    */
-  function addRules() {
+  public function addRules() {
     $this->addFormRule(array('CRM_Contact_Form_Domain', 'formRule'));
   }
 
   /**
-   * global validation rules for the form
+   * Global validation rules for the form
    *
-   * @param array $fields posted values of the form
+   * @param array $fields
+   *   Posted values of the form.
    *
    * @return array list of errors to be posted back to the form
    * @static
-   * @access public
    */
-  static function formRule($fields) {
+  public static function formRule($fields) {
     // check for state/country mapping
     $errors = CRM_Contact_Form_Edit_Address::formRule($fields, CRM_Core_DAO::$_nullArray, CRM_Core_DAO::$_nullObject);
     // $errors === TRUE means no errors from above formRule excution,
@@ -237,7 +234,6 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
    * Process the form when submitted
    *
    * @return void
-   * @access public
    */
   public function postProcess() {
     $params = $this->exportValues();
@@ -269,7 +265,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
     }
 
     $params += array('contact_id' => $this->_contactId);
-    $contactParams = array (
+    $contactParams = array(
       'sort_name'    => $domain->name,
       'display_name' => $domain->name,
       'legal_name'   => $domain->name,
@@ -323,4 +319,3 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
     $session->replaceUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
   }
 }
-