[OptionsResolver] Fix syntax errors in code examples (missing in_array closing slashes)

This pull request fixes 2 syntax errors when using `in_array()` in conditions (missing the last closing slash).

It also adds a missing `use` statement in one code example.
Merge pull request #3053 from gnutix/2.1

[OptionsResolver] Fix syntax errors in code examples (missing in_array closing slashes)