Skip to content

Commit cdd2be7

Browse files
committed
minor #25898 [minor] SCA: reduce repetitive method calls (sequential and in loop) (kalessil)
This PR was merged into the 2.7 branch. Discussion ---------- [minor] SCA: reduce repetitive method calls (sequential and in loop) | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 609372252f SCA: get rid of repetitive calls
2 parents 5822afa + 2e6435a commit cdd2be7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ExecutionContext.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals
197197
{
198198
$propertyPath = $this->getPropertyPath($subPath);
199199

200+
$visitor = $this->globalContext->getVisitor();
200201
foreach ($this->resolveGroups($groups) as $group) {
201-
$this->globalContext->getVisitor()->validate($value, $group, $propertyPath, $traverse, $deep);
202+
$visitor->validate($value, $group, $propertyPath, $traverse, $deep);
202203
}
203204
}
204205

0 commit comments

Comments
 (0)