Code Duplication    Length = 10-12 lines in 2 locations

src/SymfonyCache/PurgeListener.php 1 location

@@ 120-129 (lines=10) @@
117
     *
118
     * @return OptionsResolver
119
     */
120
    protected function getOptionsResolver()
121
    {
122
        $resolver = parent::getOptionsResolver();
123
        $resolver->setDefault('purge_method', static::DEFAULT_PURGE_METHOD);
124
        $resolver->setDefault('purge_all_header', static::DEFAULT_PURGE_ALL_HEADER);
125
        $resolver->setAllowedTypes('purge_method', 'string');
126
        $resolver->setAllowedTypes('purge_all_header', 'string');
127
128
        return $resolver;
129
    }
130
}
131

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