Commit 9045f65
committed
Fix wrong type received by "KeySet" rule
I've defined the type that `KeySet` would receive as `Key` because, in
fact, it should only accept `Key` rules.
However, the `Validator::__callStatic()` method (called when you run
`v::key(...)`) will create an instance of itself, not the instance of
`Key`, and that's because you might want to add more rules to the chain.
Knowing that, we did some workaround in which `KeySet` will check if the
given rules are either a `Key` or a `Validator` with only one Key rule.
This commit will replace the type from `Key` to `Validatable`, and let
the implementation deal with the wrong type.1 parent 294c36f commit 9045f65
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | | - | |
| 201 | + | |
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
| |||
0 commit comments