the naming of variables is really confusing here:

- ``$attributes`` is an array of ``nelmio_cors.cors.configuration.resolver`` tags
- ``$attribute`` is an array of attributes for one of these tags

you should rename them to `$tags`` and ``$tag`` or ``$tags`` and ``$attributes``