Skip to content

Commit 2bb59a8

Browse files
committed
SequentialArray: Optimize item evaluation
1 parent 8e3c01a commit 2bb59a8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/Constraint/SequentialArray.php‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,10 @@ protected function inspectData($other): array
229229
$valid = false;
230230
}
231231

232-
if ($valid && ($this->constraint !== null) && !$this->constraint->evaluate($item, '', true)) {
233-
$itemsValid = false;
232+
if ($valid && $itemsValid && ($this->constraint !== null)) {
233+
if (!$this->constraint->evaluate($item, '', true)) {
234+
$itemsValid = false;
235+
}
234236
}
235237
}
236238

0 commit comments

Comments
 (0)