minor #25898 [minor] SCA: reduce repetitive method calls (sequential and in loop) (kalessil)
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

symfony/Validator