Fixed wrong typehint in documentation for XmlEncoder

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Method documentation correction.
See https://github.com/symfony/symfony/pull/10668#discussion_r11477618