fix: noverify --fix
This commit is contained in:
parent
5aff28d2b8
commit
117640a755
44 changed files with 174 additions and 174 deletions
|
|
@ -31,7 +31,7 @@ class Code extends AbstractRule
|
|||
if (is_array($_POST[$name . '_code_genre'])) {
|
||||
$count = count($_POST[$name . '_code_genre']);
|
||||
for($n = 0; $n < $count; $n++) {
|
||||
$code = array(
|
||||
$code = [
|
||||
$_POST[$name . '_code_genre'][$n],
|
||||
$_POST[$name . '_code_f'][$n],
|
||||
$_POST[$name . '_code_i'][$n],
|
||||
|
|
@ -39,14 +39,14 @@ class Code extends AbstractRule
|
|||
$_POST[$name . '_code_year'][$n],
|
||||
$_POST[$name . '_code_month'][$n],
|
||||
$_POST[$name . '_code_day'][$n]
|
||||
);
|
||||
];
|
||||
if (!$this->checkCode($code)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
$code = array(
|
||||
$code = [
|
||||
$_POST[$name . '_code_genre'],
|
||||
$_POST[$name . '_code_f'],
|
||||
$_POST[$name . '_code_i'],
|
||||
|
|
@ -54,7 +54,7 @@ class Code extends AbstractRule
|
|||
$_POST[$name . '_code_year'],
|
||||
$_POST[$name . '_code_month'],
|
||||
$_POST[$name . '_code_day']
|
||||
);
|
||||
];
|
||||
|
||||
return $this->checkCode($code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class Count extends AbstractRule
|
|||
$this->max = $this->size;
|
||||
}
|
||||
$count = count(array_filter(array_map('trim',
|
||||
explode(";", $container->get($this->field))), array($this, 'not_empty')));
|
||||
explode(";", $container->get($this->field))), [$this, 'not_empty']));
|
||||
|
||||
return $count >= $this->size && $count <= ((int)$this->max);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue