Code Duplication    Length = 23-24 lines in 2 locations

src/DependencyInjection/Configuration.php 1 location

@@ 17-40 (lines=24) @@
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
final class Configuration implements ConfigurationInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function getConfigTreeBuilder()
23
    {
24
        $treeBuilder = new TreeBuilder();
25
26
        $rootNode = $treeBuilder->root('sculpin');
27
28
        $rootNode
29
            ->children()
30
                ->scalarNode('source_dir')->defaultValue('%sculpin.project_dir%/source')->end()
31
                ->scalarNode('output_dir')->defaultValue('%sculpin.project_dir%/output')->end()
32
                ->arrayNode('raw')
33
                    ->prototype('scalar')->end()
34
                ->end()
35
                ->scalarNode('permalink')->defaultValue('pretty')->end()
36
            ->end();
37
38
        return $treeBuilder;
39
    }
40
}
41

src/PostsBundle/DependencyInjection/Configuration.php 1 location

@@ 17-39 (lines=23) @@
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
final class Configuration implements ConfigurationInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function getConfigTreeBuilder()
23
    {
24
        $treeBuilder = new TreeBuilder();
25
26
        $rootNode = $treeBuilder->root('sculpin_posts');
27
28
        $rootNode->children()
29
            ->arrayNode('paths')
30
                ->defaultValue(['_posts'])
31
                ->prototype('scalar')->end()
32
            ->end()
33
            ->scalarNode('permalink')->defaultValue('pretty')->end()
34
            ->scalarNode('layout')->defaultValue('post')->end()
35
            ->end();
36
37
        return $treeBuilder;
38
    }
39
}
40