Comment fixes for CRM/Utils directory
[civicrm-core.git] / CRM / Utils / Address / USPS.php
index 5e85a0d576c60833e7851c6562f77527c0bd260d..6d237b992a729990c0b2b8dc7b4ce904d17bc53e 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | 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
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
  */
 
 /**
@@ -43,7 +40,7 @@ class CRM_Utils_Address_USPS {
    *
    * @return bool
    */
-  static function checkAddress(&$values) {
+  public static function checkAddress(&$values) {
     if (!isset($values['street_address']) ||
       (!isset($values['city']) &&
         !isset($values['state_province']) &&
@@ -53,7 +50,6 @@ class CRM_Utils_Address_USPS {
       return FALSE;
     }
 
-
     $userID = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::ADDRESS_STANDARDIZATION_PREFERENCES_NAME,
       'address_standardization_userid'
     );
@@ -86,8 +82,8 @@ class CRM_Utils_Address_USPS {
     $code = $request->getResponseCode();
     if ($code != 200) {
       $session->setStatus(ts('USPS Address Lookup Failed with HTTP status code: %1',
-          array(1 => $code)
-        ));
+        array(1 => $code)
+      ));
       return FALSE;
     }
 
@@ -110,17 +106,17 @@ class CRM_Utils_Address_USPS {
       return FALSE;
     }
 
-    $values['street_address'] = (string)$xml->Address->Address2;
-    $values['city'] = (string)$xml->Address->City;
-    $values['state_province'] = (string)$xml->Address->State;
-    $values['postal_code'] = (string)$xml->Address->Zip5;
-    $values['postal_code_suffix'] = (string)$xml->Address->Zip4;
+    $values['street_address'] = (string) $xml->Address->Address2;
+    $values['city'] = (string) $xml->Address->City;
+    $values['state_province'] = (string) $xml->Address->State;
+    $values['postal_code'] = (string) $xml->Address->Zip5;
+    $values['postal_code_suffix'] = (string) $xml->Address->Zip4;
 
     if (array_key_exists('Address1', $xml->Address)) {
-      $values['supplemental_address_1'] = (string)$xml->Address->Address1;
+      $values['supplemental_address_1'] = (string) $xml->Address->Address1;
     }
 
     return TRUE;
   }
-}
 
+}