INFRA-132 - Put space after flow-control (if/switch/for/foreach/while)
[civicrm-core.git] / CRM / Contact / Form / Edit / Address.php
index 8778707995c373edc8224ad7ecb31fffbc6d09d0..cdfaeef9c731bda5eb2032917f7ca26af49a6390 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -42,16 +42,18 @@ class CRM_Contact_Form_Edit_Address {
    * Build form for address input fields
    *
    * @param CRM_Core_Form $form
-   * @param int     $addressBlockCount - the index of the address array (if multiple addresses on a page)
-   * @param boolean $sharing - false, if we want to skip the address sharing features
-   * @param boolean $inlineEdit true when edit used in inline edit
+   * @param int $addressBlockCount
+   *   The index of the address array (if multiple addresses on a page).
+   * @param bool $sharing
+   *   False, if we want to skip the address sharing features.
+   * @param bool $inlineEdit
+   *   True when edit used in inline edit.
    *
    * @return void
    *
-   * @access public
    * @static
    */
-  static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharing = TRUE, $inlineEdit = FALSE) {
+  public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharing = TRUE, $inlineEdit = FALSE) {
     // passing this via the session is AWFUL. we need to fix this
     if (!$addressBlockCount) {
       $blockId = ($form->get('Address_Block_Count')) ? $form->get('Address_Block_Count') : 1;
@@ -261,10 +263,9 @@ class CRM_Contact_Form_Edit_Address {
    *
    * @return array|bool if no errors
    *
-   * @access public
    * @static
    */
-  static function formRule($fields, $files, $self) {
+  public static function formRule($fields, $files, $self) {
     $errors = array();
 
     $customDataRequiredFields = array();
@@ -279,7 +280,7 @@ class CRM_Contact_Form_Edit_Address {
           // DETACH 'required' form rule error to
           // custom data only if address data not exists upon submission
           if (!empty($customDataRequiredFields)) {
-            foreach($customDataRequiredFields as $customElementName) {
+            foreach ($customDataRequiredFields as $customElementName) {
               $elementName = "address[$instance][$customElementName]";
               if ($self->getElementError($elementName)) {
                 // set element error to none
@@ -293,7 +294,7 @@ class CRM_Contact_Form_Edit_Address {
         // DETACH 'required' form rule error to
         // custom data only if address data not exists upon submission
         if (!empty($customDataRequiredFields) && !CRM_Core_BAO_Address::dataExists($addressValues)) {
-          foreach($customDataRequiredFields as $customElementName) {
+          foreach ($customDataRequiredFields as $customElementName) {
             $elementName = "address[$instance][$customElementName]";
             if ($self->getElementError($elementName)) {
               // set element error to none
@@ -314,13 +315,14 @@ class CRM_Contact_Form_Edit_Address {
   /**
    * Set default values for address block
    *
-   * @param array  $defaults  defaults associated array
-   * @param CRM_Core_Form $form     form object
+   * @param array $defaults
+   *   Defaults associated array.
+   * @param CRM_Core_Form $form
+   *   Form object.
    *
    * @static
-   * @access public
    */
-  static function setDefaultValues( &$defaults, &$form ) {
+  public static function setDefaultValues( &$defaults, &$form ) {
     $addressValues = array();
     if (isset($defaults['address']) && is_array($defaults['address']) &&
       !CRM_Utils_System::isNull($defaults['address'])
@@ -418,7 +420,7 @@ class CRM_Contact_Form_Edit_Address {
    * @param CRM_Core_Form $form
    * @param $groupTree
    */
-  static function storeRequiredCustomDataInfo(&$form, $groupTree) {
+  public static function storeRequiredCustomDataInfo(&$form, $groupTree) {
     if (CRM_Utils_System::getClassName($form) == 'CRM_Contact_Form_Contact') {
       $requireOmission = NULL;
       foreach ($groupTree as $csId => $csVal) {