minor tidy ups
[civicrm-core.git] / CRM / Utils / Rule.php
index 50f0e60c8596d033352992ee77222f8cf0a04cd4..65944518963515ecf2bedba812b9e32229f9b938 100644 (file)
@@ -222,10 +222,11 @@ class CRM_Utils_Rule {
    * specified has to be beyond today. (i.e today or later)
    *
    * @param array $date
-   * @param bool  $monthRequired check whether month is mandatory
+   * @param bool $monthRequired
+   *   Check whether month is mandatory.
    *
-   * @return bool true if valid date
-   * @static
+   * @return bool
+   *   true if valid date
    */
   public static function currentDate($date, $monthRequired = TRUE) {
     $config = CRM_Core_Config::singleton();
@@ -315,8 +316,8 @@ class CRM_Utils_Rule {
    *
    * @param string $date
    *
-   * @return bool true if valid date
-   * @static
+   * @return bool
+   *   true if valid date
    */
   public static function mysqlDate($date) {
     // allow date to be null
@@ -422,14 +423,14 @@ class CRM_Utils_Rule {
 
     $config = CRM_Core_Config::singleton();
 
-    //CRM-14868 
+    //CRM-14868
     $currencySymbols = CRM_Core_PseudoConstant::get(
-                          'CRM_Contribute_DAO_Contribution',
-                          'currency', array(
-                                           'keyColumn' => 'name',
-                                           'labelColumn' => 'symbol'
-                                            ));
-    $value = str_replace($currencySymbols,'',$value);
+      'CRM_Contribute_DAO_Contribution',
+      'currency', array(
+        'keyColumn' => 'name',
+        'labelColumn' => 'symbol',
+      ));
+    $value = str_replace($currencySymbols, '', $value);
 
     if ($config->monetaryThousandSeparator) {
       $mon_thousands_sep = $config->monetaryThousandSeparator;
@@ -535,10 +536,10 @@ class CRM_Utils_Rule {
     return TRUE;
   }
 
-  // allow between 4-6 digits as postal code since india needs 6 and US needs 5 (or
-  // if u disregard the first 0, 4 (thanx excel!)
-  // FIXME: we need to figure out how to localize such rules
   /**
+   * allow between 4-6 digits as postal code since india needs 6 and US needs 5 (or
+   * if u disregard the first 0, 4 (thanx excel!)
+   * FIXME: we need to figure out how to localize such rules
    * @param $value
    *
    * @return bool
@@ -554,9 +555,10 @@ class CRM_Utils_Rule {
    * See how file rules are written in HTML/QuickForm/file.php
    * Checks to make sure the uploaded file is ascii
    *
-   * @param     array     Uploaded file info (from $_FILES)
+   * @param array Uploaded file info (from $_FILES)
    *
-   * @return    bool      true if file has been uploaded, false otherwise
+   * @return bool
+   *   true if file has been uploaded, false otherwise
    */
   public static function asciiFile($elementValue) {
     if ((isset($elementValue['error']) && $elementValue['error'] == 0) ||
@@ -570,9 +572,10 @@ class CRM_Utils_Rule {
   /**
    * Checks to make sure the uploaded file is in UTF-8, recodes if it's not
    *
-   * @param     array     Uploaded file info (from $_FILES)
+   * @param array Uploaded file info (from $_FILES)
    *
-   * @return    bool      whether file has been uploaded properly and is now in UTF-8
+   * @return bool
+   *   whether file has been uploaded properly and is now in UTF-8
    */
   public static function utf8File($elementValue) {
     $success = FALSE;
@@ -599,9 +602,10 @@ class CRM_Utils_Rule {
    * See how file rules are written in HTML/QuickForm/file.php
    * Checks to make sure the uploaded file is html
    *
-   * @param     array     Uploaded file info (from $_FILES)
+   * @param array Uploaded file info (from $_FILES)
    *
-   * @return    bool      true if file has been uploaded, false otherwise
+   * @return bool
+   *   true if file has been uploaded, false otherwise
    */
   public static function htmlFile($elementValue) {
     if ((isset($elementValue['error']) && $elementValue['error'] == 0) ||
@@ -615,11 +619,13 @@ class CRM_Utils_Rule {
   /**
    * Check if there is a record with the same name in the db
    *
-   * @param string $value     the value of the field we are checking
-   * @param array  $options   the daoName and fieldName (optional )
+   * @param string $value
+   *   The value of the field we are checking.
+   * @param array $options
+   *   The daoName and fieldName (optional ).
    *
-   * @return boolean     true if object exists
-   * @static
+   * @return boolean
+   *   true if object exists
    */
   public static function objectExists($value, $options) {
     $name = 'name';
@@ -745,8 +751,8 @@ class CRM_Utils_Rule {
    *
    * @param array $date
    *
-   * @return bool true if valid date
-   * @static
+   * @return bool
+   *   true if valid date
    */
   public static function qfDate($date) {
     $config = CRM_Core_Config::singleton();