minor #28994 SCA: minor code tweaks (vladimir.reznichenko, kalessil)
minor #28994 SCA: minor code tweaks (vladimir.reznichenko, kalessil)

This PR was merged into the 3.4 branch.

Discussion
----------

SCA: minor code tweaks

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Following tweaks included:
- repetitive method calls
- greedy regex
- unnecessary function calls (simplifications)

Commits
-------

b12c89d481 SCA: fixed broken tests
42e96ff7a2 SCA: applied code style as per guidelines
8dbd927a33 SCA: minor code tweaks

symfony/framework-bundle