Skip to content

Commit a60fb55

Browse files
authored
Merge pull request #6591 from ping-yee/docs-some-validation-class
docs: replace types in `Validation\Rule`, `Validation\Validation` and `Validation\ValidationInterface`
2 parents e41c0ba + a78e9fb commit a60fb55

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

system/Validation/Rules.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public function not_in_list(?string $value, string $list): bool
209209
}
210210

211211
/**
212-
* @param mixed $str
212+
* @param array|bool|float|int|object|string|null $str
213213
*/
214214
public function required($str = null): bool
215215
{

system/Validation/Validation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ public function run(?array $data = null, ?string $group = null, ?string $dbGroup
183183
* Runs the validation process, returning true or false
184184
* determining whether validation was successful or not.
185185
*
186-
* @param mixed $value
187-
* @param string[] $errors
186+
* @param array|bool|float|int|object|string|null $value
187+
* @param string[] $errors
188188
*/
189189
public function check($value, string $rule, array $errors = []): bool
190190
{

system/Validation/ValidationInterface.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ public function run(?array $data = null, ?string $group = null): bool;
3131
* Check; runs the validation process, returning true or false
3232
* determining whether or not validation was successful.
3333
*
34-
* @param mixed $value Value to validation.
35-
* @param string $rule Rule.
36-
* @param string[] $errors Errors.
34+
* @param array|bool|float|int|object|string|null $value Value to validate.
35+
* @param string[] $errors
3736
*
3837
* @return bool True if valid, else false.
3938
*/

0 commit comments

Comments
 (0)