From 412562fc81498306a315931ccbf272f6246bd00f Mon Sep 17 00:00:00 2001 From: devin <707077549@qq.com> Date: Sun, 29 Oct 2023 15:16:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Validation.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Validation.php b/src/Validation.php index c786d28..f1ebd5d 100644 --- a/src/Validation.php +++ b/src/Validation.php @@ -860,7 +860,7 @@ protected function parse_error_message($error_msg) * @param array &$parse_arr [description] * @param string $string [description] * @param string $type [description] - * @return [type] [description] + * @return bool [description] */ protected function pars_gh_string_to_array(&$parse_arr, $string, $type = "key") { @@ -899,7 +899,7 @@ protected function pars_gh_string_to_array(&$parse_arr, $string, $type = "key") * @param array $rule_error_msg Parsed error message array * @param string $tag * @param bool|boolean $only_user_err_msg if can not find error message from user error message, will try to find it from error template - * @return [type] [description] + * @return string */ protected function match_error_message($rule_error_msg, $tag, $only_user_err_msg = false) { @@ -1278,11 +1278,11 @@ protected function r_unset(&$data, $field, $force=true) * error template message * @Author Devin * @param string $tag - * @return [type] + * @return string */ public function get_error_template($tag = '') { - return ($tag == '' || !isset($this->error_template[$tag])) ? false : $this->error_template[$tag]; + return ($tag == '' || !isset($this->error_template[$tag])) ? '' : $this->error_template[$tag]; } /** @@ -1363,7 +1363,7 @@ protected function set_error($field = '', $message = '', $is_or_rule=false) * Get error message * @Author Devin * @param boolean $fromat [description] - * @return [type] [description] + * @return array [description] */ public function get_error($standard=true, $simple=true) { @@ -1381,11 +1381,11 @@ public function get_error($standard=true, $simple=true) * If set to true, replace field value to "true" if it's valid, replace field value to error_message if it's invalid. * If set to false, don't replace field value if it's valid, replace field value to error_message if it's invalid. * @Author Devin - * @param [type] $bool [description] + * @param bool $result_classic [description] */ - public function set_result_classic($bool) + public function set_result_classic($result_classic) { - $this->result_classic = $bool; + $this->result_classic = $result_classic; } /** @@ -1393,8 +1393,8 @@ public function set_result_classic($bool) * If set to true, replace field value to "true" if it's valid, replace field value to error_message if it's invalid. * If set to false, don't replace field value if it's valid, replace field value to error_message if it's invalid. * @Author Devin - * @param [type] $field [description] - * @param [type] $result [description] + * @param string $field [description] + * @param bool $result [description] */ protected function set_result($field, $result) {