From 3908f086e0c423d2ede2b78e9d4ac0c8c644ba88 Mon Sep 17 00:00:00 2001 From: Willem Wollebrants Date: Mon, 25 Jun 2018 22:15:31 +0200 Subject: [PATCH 1/2] fix incorrect phpdoc for callable --- src/Valitron/Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Valitron/Validator.php b/src/Valitron/Validator.php index 0f70856..4404d48 100644 --- a/src/Valitron/Validator.php +++ b/src/Valitron/Validator.php @@ -1147,7 +1147,7 @@ class Validator /** * Convenience method to add a single validation rule * - * @param string|callback $rule + * @param string|callable $rule * @param array|string $fields * @return $this * @throws \InvalidArgumentException From fcaa1d5d52c7d4f09b53bd566432f19c4a226f4c Mon Sep 17 00:00:00 2001 From: Willem Wollebrants Date: Mon, 25 Jun 2018 22:18:19 +0200 Subject: [PATCH 2/2] make phpdoc more specific for parameter in Validator::addInstanceRule and Validator::addRule, both need a callable --- src/Valitron/Validator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Valitron/Validator.php b/src/Valitron/Validator.php index 4404d48..313d7e8 100644 --- a/src/Valitron/Validator.php +++ b/src/Valitron/Validator.php @@ -1079,7 +1079,7 @@ class Validator * instance only. * * @param string $name - * @param mixed $callback + * @param callable $callback * @param string $message * @throws \InvalidArgumentException */ @@ -1095,7 +1095,7 @@ class Validator * Register new validation rule callback * * @param string $name - * @param mixed $callback + * @param callable $callback * @param string $message * @throws \InvalidArgumentException */