[Template]fix some type error in annotate.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a
That type error in annotate is here:
* https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Templating/Loader/LoaderInterface.php#L30