Code Duplication    Length = 18-23 lines in 5 locations

src/DependencyInjection/Configuration.php 5 locations

@@ 83-101 (lines=19) @@
80
     *
81
     * @return ArrayNodeDefinition
82
     */
83
    private function addSessionSupportSection()
84
    {
85
        $tree = new TreeBuilder();
86
        $node = $tree->root('session');
87
88
        $node
89
            ->canBeEnabled()
90
            ->addDefaultsIfNotSet()
91
            ->children()
92
                ->scalarNode('service_id')->isRequired()->end()
93
                ->booleanNode('use_tagging')->defaultTrue()->end()
94
                ->scalarNode('prefix')->defaultValue('session_')->end()
95
                ->scalarNode('ttl')->end()
96
            ->end();
97
98
        $this->normalizeEnabled($node);
99
100
        return $node;
101
    }
102
103
    /**
104
     * Configure the "cache.serializer" section.
@@ 108-125 (lines=18) @@
105
     *
106
     * @return ArrayNodeDefinition
107
     */
108
    private function addSerializerSection()
109
    {
110
        $tree = new TreeBuilder();
111
        $node = $tree->root('serializer');
112
113
        $node
114
            ->canBeEnabled()
115
            ->addDefaultsIfNotSet()
116
            ->children()
117
            ->scalarNode('service_id')->isRequired()->end()
118
                ->booleanNode('use_tagging')->defaultTrue()->end()
119
                ->scalarNode('prefix')->defaultValue('')->end()
120
            ->end();
121
122
        $this->normalizeEnabled($node);
123
124
        return $node;
125
    }
126
127
    /**
128
     * Configure the "cache.serializer" section.
@@ 132-149 (lines=18) @@
129
     *
130
     * @return ArrayNodeDefinition
131
     */
132
    private function addValidationSection()
133
    {
134
        $tree = new TreeBuilder();
135
        $node = $tree->root('validation');
136
137
        $node
138
            ->canBeEnabled()
139
            ->addDefaultsIfNotSet()
140
            ->children()
141
                ->scalarNode('service_id')->isRequired()->end()
142
                ->booleanNode('use_tagging')->defaultTrue()->end()
143
                ->scalarNode('prefix')->defaultValue('')->end()
144
            ->end();
145
146
        $this->normalizeEnabled($node);
147
148
        return $node;
149
    }
150
151
    /**
152
     * Configure the "cache.annotation" section.
@@ 156-173 (lines=18) @@
153
     *
154
     * @return ArrayNodeDefinition
155
     */
156
    private function addAnnotationSection()
157
    {
158
        $tree = new TreeBuilder();
159
        $node = $tree->root('annotation');
160
161
        $node
162
            ->canBeEnabled()
163
            ->addDefaultsIfNotSet()
164
            ->children()
165
                ->scalarNode('service_id')->isRequired()->end()
166
                ->booleanNode('use_tagging')->defaultTrue()->end()
167
                ->scalarNode('prefix')->defaultValue('')->end()
168
            ->end();
169
170
        $this->normalizeEnabled($node);
171
172
        return $node;
173
    }
174
175
    /**
176
     * @return ArrayNodeDefinition
@@ 260-282 (lines=23) @@
257
     *
258
     * @return ArrayNodeDefinition
259
     */
260
    private function addRouterSection()
261
    {
262
        $tree = new TreeBuilder();
263
        $node = $tree->root('router');
264
265
        $node
266
            ->canBeEnabled()
267
            ->addDefaultsIfNotSet()
268
            ->children()
269
                ->integerNode('ttl')
270
                    ->defaultValue(604800)
271
                ->end()
272
                ->scalarNode('service_id')
273
                    ->isRequired()
274
                ->end()
275
                ->booleanNode('use_tagging')->defaultTrue()->end()
276
                ->scalarNode('prefix')->defaultValue('')->end()
277
            ->end();
278
279
        $this->normalizeEnabled($node);
280
281
        return $node;
282
    }
283
284
    /**
285
     * @return ArrayNodeDefinition