Skip to content

Commit 1edcabb

Browse files
committed
fix code style
1 parent 50e54bc commit 1edcabb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Keywords/OneOfKeyword.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ public function validate(ValidationContext $context, Schema $schema): ?Validatio
7474
$error = $context->validateSchemaWithoutEvaluated($value, null, false, $object);
7575
if ($error) {
7676
$errors[] = $error;
77-
}
78-
if (!$error) {
77+
} else {
7978
if (++$count > 1) {
8079
$this->addEvaluatedFromArrayObject($object, $context);
8180
return $this->error($schema, $context, 'oneOf', 'The data should match exactly one schema', [

0 commit comments

Comments
 (0)