Постфиксная запись типов вместо префиксной
This commit is contained in:
parent
04662a94df
commit
11370eecc9
33 changed files with 95 additions and 79 deletions
|
|
@ -74,7 +74,7 @@ class Validator
|
|||
}
|
||||
}
|
||||
|
||||
public function addRule(/*.any.*/$rule) {
|
||||
public function addRule($rule/*: any*/) {
|
||||
if (is_array($rule)) {
|
||||
$this->chain = array_merge($this->chain, $rule);
|
||||
} else {
|
||||
|
|
@ -82,7 +82,7 @@ class Validator
|
|||
}
|
||||
}
|
||||
|
||||
public function skip(/*.AbstractRule.*/$rule, /*.Collection.*/$container) // -> Rule_Abstract
|
||||
public function skip($rule/*: AbstractRule*/, $container/*: Collection*/) // -> Rule_Abstract
|
||||
{
|
||||
if ($rule->skipEmpty()) {
|
||||
$data = $container->get($rule->field);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue