Code Duplication    Length = 28-28 lines in 2 locations

DependencyInjection/Configuration.php 2 locations

@@ 153-180 (lines=28) @@
150
     *
151
     * @return  \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
152
     */
153
    private function getPersistersNode()
154
    {
155
        $node = $this->createRootNode('persisters');
156
        return $node
157
            ->isRequired()
158
            ->useAttributeAsKey('name')
159
            ->prototype('array')
160
                ->children()
161
162
                    ->enumNode('type')
163
                        ->values(['mongodb', null])
164
                    ->end()
165
                    ->scalarNode('service')->cannotBeEmpty()->end()
166
167
                    ->arrayNode('parameters')
168
                        ->performNoDeepMerging()
169
                        ->prototype('variable')->end()
170
                    ->end()
171
                ->end()
172
            ->end()
173
            ->validate()
174
                ->always(function($v) {
175
                    $this->validatePersisters($v);
176
                    return $v;
177
                })
178
            ->end()
179
        ;
180
    }
181
182
    /**
183
     * Gets the rest configuration node.
@@ 212-239 (lines=28) @@
209
     *
210
     * @return  \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
211
     */
212
    private function getSearchClientsNode()
213
    {
214
        $node = $this->createRootNode('search_clients');
215
        return $node
216
            ->isRequired()
217
            ->useAttributeAsKey('name')
218
            ->prototype('array')
219
                ->children()
220
221
                    ->enumNode('type')
222
                        ->values(['elastic', null])
223
                    ->end()
224
                    ->scalarNode('service')->cannotBeEmpty()->end()
225
226
                    ->arrayNode('parameters')
227
                        ->performNoDeepMerging()
228
                        ->prototype('variable')->end()
229
                    ->end()
230
                ->end()
231
            ->end()
232
            ->validate()
233
                ->always(function($v) {
234
                    $this->validateSearchClients($v);
235
                    return $v;
236
                })
237
            ->end()
238
        ;
239
    }
240
241
    /**
242
     * Validates the api adapter config.