From 4c91e3397ac600e3c53562a977002f3edc17ff6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20de=20la=20Cal?= Date: Mon, 10 Jul 2023 08:52:58 +0200 Subject: [PATCH] Fix wrong type in "KeySet" rule The documentation states that we should use Validator::keySet() in combination with Validator::key() but the return type of key() does not match the expected parameter type of keyset(). Co-authored-by: Henrique Moody --- library/StaticValidator.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/StaticValidator.php b/library/StaticValidator.php index 8e447606..ce7f9e9c 100644 --- a/library/StaticValidator.php +++ b/library/StaticValidator.php @@ -10,7 +10,6 @@ declare(strict_types=1); namespace Respect\Validation; use finfo; -use Respect\Validation\Rules\Key; interface StaticValidator { @@ -201,7 +200,7 @@ interface StaticValidator bool $mandatory = true ): ChainedValidator; - public static function keySet(Key ...$rule): ChainedValidator; + public static function keySet(Validatable ...$rule): ChainedValidator; public static function keyValue(string $comparedKey, string $ruleName, string $baseKey): ChainedValidator;