Code Duplication    Length = 19-20 lines in 2 locations

DependencyInjection/Configuration.php 2 locations

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