fix: Определения типов
This commit is contained in:
parent
9f6fd74b17
commit
dd74a97894
28 changed files with 334 additions and 249 deletions
|
|
@ -83,7 +83,7 @@ class Validator
|
|||
}
|
||||
}
|
||||
|
||||
public function addRule($rule/*:z any*/) {
|
||||
public function addRule($rule) {
|
||||
if (is_array($rule)) {
|
||||
$this->chain = array_merge($this->chain, $rule);
|
||||
} else {
|
||||
|
|
@ -91,7 +91,11 @@ class Validator
|
|||
}
|
||||
}
|
||||
|
||||
public function skip($rule/*z: AbstractRule*/, $container/*: Collection*/) // -> Rule_Abstract
|
||||
/**
|
||||
* @param AbstractRule $rule
|
||||
* @param Collection $container
|
||||
*/
|
||||
public function skip($rule, $container) // -> Rule_Abstract
|
||||
{
|
||||
if ($rule->skipEmpty()) {
|
||||
$data = $container->get($rule->field);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue