Skip to content

Commit

Permalink
Fix wrong type in "KeySet" rule
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Csardelacal and henriquemoody committed Jan 28, 2024
1 parent 8d7d783 commit 4c91e33
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/StaticValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
namespace Respect\Validation;

use finfo;
use Respect\Validation\Rules\Key;

interface StaticValidator
{
Expand Down Expand Up @@ -201,7 +200,7 @@ public static function keyNested(
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;

Expand Down

0 comments on commit 4c91e33

Please sign in to comment.