[2.7] [Form] Replaced calls to array_search() by in_array() where is no need to get the index
[2.7] [Form] Replaced calls to array_search() by in_array() where is no need to get the index

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

symfony/twig-bridge,symfony/TwigBridge