Skip to content

Commit 59a0cd7

Browse files
committed
simplify conditional
1 parent 1277bb3 commit 59a0cd7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Validator/DocumentValidator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ public static function validate(
132132

133133
$errors = $context->getErrors();
134134

135-
// Only cache clean results
136-
if (isset($cache) && count($errors) === 0) {
135+
if (isset($cache) && $errors === []) {
137136
$cache->markValidated($schema, $ast);
138137
}
139138

0 commit comments

Comments
 (0)