codespell: CRM/*
[civicrm-core.git] / CRM / Contact / Form / Edit / Household.php
index 66414d25f60c218a4a3229888423afb9d0d9d169..417a8261043e00f43d6d959e838d00432e2bdca0 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 
 /**
- * Auxilary class to provide support to the Contact Form class. Does this by implementing
+ * Auxiliary class to provide support to the Contact Form class. Does this by implementing
  * a small set of static methods
  *
  */
 class CRM_Contact_Form_Edit_Household {
 
   /**
-   * This function provides the HTML form elements that are specific
+   * This function provides the HTML form elements that are specific.
    * to the Household Contact Type
    *
-   * @param CRM_Core_Form $form form object
-   * @param int $inlineEditMode ( 1 for contact summary
+   * @param CRM_Core_Form $form
+   *   Form object.
+   * @param int $inlineEditMode
+   *   ( 1 for contact summary.
    * top bar form and 2 for display name edit )
    *
-   * @access public
    * @return void
    */
   public static function buildQuickForm(&$form, $inlineEditMode = NULL) {
@@ -56,18 +57,18 @@ class CRM_Contact_Form_Edit_Household {
 
     $form->applyFilter('__ALL__', 'trim');
 
-    if ( !$inlineEditMode || $inlineEditMode == 1 ) {
+    if (!$inlineEditMode || $inlineEditMode == 1) {
       // household_name
       $form->add('text', 'household_name', ts('Household Name'), $attributes['household_name']);
     }
 
-    if ( !$inlineEditMode || $inlineEditMode == 2 ) {
+    if (!$inlineEditMode || $inlineEditMode == 2) {
       // nick_name
       $form->addElement('text', 'nick_name', ts('Nickname'), $attributes['nick_name']);
       $form->addElement('text', 'contact_source', ts('Source'), CRM_Utils_Array::value('source', $attributes));
     }
 
-    if ( !$inlineEditMode ) {
+    if (!$inlineEditMode) {
       $form->add('text', 'external_identifier', ts('External ID'), $attributes['external_identifier'], FALSE);
       $form->addRule('external_identifier',
         ts('External ID already exists in Database.'),
@@ -78,16 +79,18 @@ class CRM_Contact_Form_Edit_Household {
   }
 
   /**
-   * Add rule for household
+   * Add rule for household.
    *
-   * @param array $fields array of form values
-   * @param array $files - unused
+   * @param array $fields
+   *   Array of form values.
+   * @param array $files
+   *   Unused.
    * @param int $contactID
    *
-   * @return array|bool $error@static
-   * @public
+   * @return array|bool
+   *   $error
    */
-  static function formRule($fields, $files, $contactID = NULL) {
+  public static function formRule($fields, $files, $contactID = NULL) {
     $errors = array();
     $primaryID = CRM_Contact_Form_Contact::formRule($fields, $errors, $contactID);
 
@@ -101,5 +104,5 @@ class CRM_Contact_Form_Edit_Household {
 
     return empty($errors) ? TRUE : $errors;
   }
-}
 
+}