Skip to content

Commit 452096e

Browse files
author
symfonyaml
committed
Apply fabbot.io suggestions
1 parent ca804fb commit 452096e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
*/
2727
class ChoiceValidator extends ConstraintValidator
2828
{
29-
/**
30-
* {@inheritdoc}
31-
*/
3229
public function validate($value, Constraint $constraint)
3330
{
3431
if (!$constraint instanceof Choice) {
@@ -58,11 +55,8 @@ public function validate($value, Constraint $constraint)
5855
if (is_iterable($choices)) {
5956
$choices = iterator_to_array($choices, true);
6057
}
61-
if (!is_array($choices)) {
62-
throw new ConstraintDefinitionException(sprintf(
63-
'The Choice constraint expects the callback to return an iterable value, got %s.',
64-
get_debug_type($choices),
65-
));
58+
if (!\is_array($choices)) {
59+
throw new ConstraintDefinitionException(\sprintf('The Choice constraint expects the callback to return an iterable value, got %s.', get_debug_type($choices)));
6660
}
6761
} else {
6862
$choices = $constraint->choices;

0 commit comments

Comments
 (0)