Code Duplication    Length = 19-20 lines in 2 locations

DependencyInjection/Configuration.php 2 locations

@@ 62-81 (lines=20) @@
59
     *
60
     * @return  \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
61
     */
62
    private function getAdapterNode()
63
    {
64
        $node = $this->createRootNode('adapter');
65
        return $node
66
            ->isRequired()
67
            ->addDefaultsIfNotSet()
68
            ->children()
69
                ->enumNode('type')
70
                    ->values(['jsonapiorg', null])
71
                ->end()
72
                ->scalarNode('service')->cannotBeEmpty()->end()
73
            ->end()
74
            ->validate()
75
                ->always(function($v) {
76
                    $this->validateAdapter($v);
77
                    return $v;
78
                })
79
            ->end()
80
        ;
81
    }
82
83
    /**
84
     * Gets the metadata configuration node.
@@ 187-205 (lines=19) @@
184
     *
185
     * @return  \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition
186
     */
187
    private function getRestNode()
188
    {
189
        $node = $this->createRootNode('rest');
190
        return $node
191
            ->addDefaultsIfNotSet()
192
            ->children()
193
                ->scalarNode('root_endpoint')->isRequired()->cannotBeEmpty()->defaultValue('modlr/api')
194
                    ->validate()
195
                        ->always(function($v) {
196
                            $v = $this->formatRestEndpoint($v);
197
                            return $v;
198
                        })
199
                    ->end()
200
                ->end()
201
                ->booleanNode('debug')->defaultValue(false)->end()
202
            ->end()
203
204
        ;
205
    }
206
207
    /**
208
     * Gets the search clients configuration node.