[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.

I've based the change on 2.1 as it issue was already there. But it can easily be rebased on 2.2 if needed.