Respect / Validation

The most awesome validation engine ever created for PHP
https://respect-validation.readthedocs.io
MIT License
5.75k stars 774 forks source link

Documentation: Fix parameter type of keySet #1430

Closed Csardelacal closed 5 months ago

Csardelacal commented 1 year ago

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().

If I am not mistaken, the StaticValidator interface is only used as a mixin for IDEs and Static Code Analysis to determine whether the library is being used correctly, so this change should have no side effects.

Csardelacal commented 1 year ago

Some tests were failing on my machine. It seems like the library is generating debug output, which looks like this:

--- Expected
+++ Actual
@@ @@
-'bool(false)\n
+'Standard input code:19:\n
+bool(false)\n
+Standard input code:20:\n
 bool(true)\n

These were failing before and after the change, and manually reviewing them seems that they're just broken by the debugging information.

henriquemoody commented 5 months ago

I've made a little change, and I merged it via 4c91e3397ac600e3c53562a977002f3edc17ff6a

This change is available on version 2.3.1.

Thank you for contributing! 🐼