Code Duplication    Length = 10-12 lines in 2 locations

src/SymfonyCache/PurgeTagsListener.php 1 location

@@ 142-153 (lines=12) @@
139
     *
140
     * @return OptionsResolver
141
     */
142
    protected function getOptionsResolver()
143
    {
144
        $resolver = parent::getOptionsResolver();
145
        $resolver->setDefaults([
146
            'tags_method' => static::DEFAULT_TAGS_METHOD,
147
            'tags_header' => static::DEFAULT_TAGS_HEADER,
148
        ]);
149
        $resolver->setAllowedTypes('tags_method', 'string');
150
        $resolver->setAllowedTypes('tags_header', 'string');
151
152
        return $resolver;
153
    }
154
}
155

src/SymfonyCache/PurgeListener.php 1 location

@@ 129-138 (lines=10) @@
126
     *
127
     * @return OptionsResolver
128
     */
129
    protected function getOptionsResolver()
130
    {
131
        $resolver = parent::getOptionsResolver();
132
        $resolver->setDefault('purge_method', static::DEFAULT_PURGE_METHOD);
133
        $resolver->setDefault('clear_cache_header', static::DEFAULT_CLEAR_CACHE_HEADER);
134
        $resolver->setAllowedTypes('purge_method', 'string');
135
        $resolver->setAllowedTypes('clear_cache_header', 'string');
136
137
        return $resolver;
138
    }
139
}
140