mirror of
https://github.com/Respect/Validation.git
synced 2024-06-01 13:22:24 +02:00
Apply "SlevomatCodingStandard.ControlStructures.EarlyExit"
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
parent
7e3bf36f8d
commit
d72d247ddc
|
@ -232,9 +232,15 @@ class NestedValidationException extends ValidationException implements IteratorA
|
|||
{
|
||||
while (count($ids) > 0) {
|
||||
$id = array_shift($ids);
|
||||
if (isset($templates[$id]) && is_array($templates[$id])) {
|
||||
$templates = $templates[$id];
|
||||
if (!isset($templates[$id])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!is_array($templates[$id])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$templates = $templates[$id];
|
||||
}
|
||||
|
||||
return $templates;
|
||||
|
|
|
@ -47,7 +47,9 @@ class SizeException extends NestedValidationException
|
|||
{
|
||||
if (!$this->getParam('minValue')) {
|
||||
return self::GREATER;
|
||||
} elseif (!$this->getParam('maxValue')) {
|
||||
}
|
||||
|
||||
if (!$this->getParam('maxValue')) {
|
||||
return self::LOWER;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
</rule>
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition" />
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch" />
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit" />
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses" />
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" />
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator" />
|
||||
|
|
Loading…
Reference in a new issue