Merge pull request #22460 from civicrm/5.46
[civicrm-core.git] / CRM / Utils / Rule.php
index 862e4603f74740b6c3137c55609e2e3d226d00fd..4e63ec01035caf9f9868335d9452508b35b7bb72 100644 (file)
@@ -261,10 +261,10 @@ class CRM_Utils_Rule {
   }
 
   /**
-   * @param $value
+   * @param string $value
    * @param null $default
    *
-   * @return null
+   * @return string|null
    */
   public static function date($value, $default = NULL) {
     if (is_string($value) &&
@@ -276,10 +276,10 @@ class CRM_Utils_Rule {
   }
 
   /**
-   * @param $value
+   * @param string $value
    * @param null $default
    *
-   * @return null|string
+   * @return string|null
    */
   public static function dateTime($value, $default = NULL) {
     $result = $default;
@@ -755,24 +755,6 @@ class CRM_Utils_Rule {
     return $success;
   }
 
-  /**
-   * See how file rules are written in HTML/QuickForm/file.php
-   * Checks to make sure the uploaded file is html
-   *
-   * @param array $elementValue
-   *
-   * @return bool
-   *   True if file has been uploaded, false otherwise
-   */
-  public static function htmlFile($elementValue) {
-    if ((isset($elementValue['error']) && $elementValue['error'] == 0) ||
-      (!empty($elementValue['tmp_name']) && $elementValue['tmp_name'] != 'none')
-    ) {
-      return CRM_Utils_File::isHtmlFile($elementValue['tmp_name']);
-    }
-    return FALSE;
-  }
-
   /**
    * Check if there is a record with the same name in the db.
    *