Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b7c2ba

Browse files
Fixed coding standards
1 parent 8454893 commit 0b7c2ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Component/Validator/Constraints/AtLeastOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AtLeastOne extends Composite
2424
protected static $errorNames = [
2525
self::AT_LEAST_ONE_ERROR => 'AT_LEAST_ONE_ERROR',
2626
];
27-
27+
2828
public $constraints = [];
2929
public $message = 'This value should satisfy at least one of the following constraints:';
3030
public $messageCollection = 'Each element of this collection should satisfy its own set of constraints.';

src/Symfony/Component/Validator/Constraints/AtLeastOneValidator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ public function validate($value, Constraint $constraint)
3636
foreach ($constraint->constraints as $key => $item) {
3737
$violations = $validator->validate($value, $item);
3838

39-
if (0 === count($violations)) {
39+
if (0 === \count($violations)) {
4040
return;
4141
}
4242

4343
if ($constraint->includeInternalMessages) {
44-
$message = ' ['.($key+1).'] ';
44+
$message = ' ['.($key + 1).'] ';
4545

4646
if ($item instanceof All || $item instanceof Collection) {
4747
$message .= $constraint->messageCollection;
4848
} else {
4949
$message .= $violations->get(0)->getMessage();
5050
}
5151

52-
$messages[] = $message;
52+
$messages[] = $message;
5353
}
5454
}
5555

0 commit comments

Comments
 (0)