Completed
Pull Request — master (#9)
by ANTHONIUS
02:18
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
namespace Dotfiles\Plugins\NVM;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Configuration for NVM
10
 *
11
 * @author Anthonius Munthi <[email protected]>
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    public function getConfigTreeBuilder(): TreeBuilder
16
    {
17
        $builder = new TreeBuilder();
18
        
19
        $root = $builder->root('nvm');
20
        $root
21
            ->children()
22
                ->scalarNode('install_dir')
23
                    ->defaultValue('%dotfiles.vendor_dir%/.nvm')
24
                ->end()
25
            ->end()
26
        ;
27
        return $builder;
28
    }
29
}
30