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

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the dotfiles project.
5
 *
6
 *     (c) Anthonius Munthi <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Dotfiles\Plugins\NVM;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * Configuration for NVM.
19
 *
20
 * @author Anthonius Munthi <[email protected]>
21
 */
22
class Configuration implements ConfigurationInterface
23
{
24
    public function getConfigTreeBuilder(): TreeBuilder
25
    {
26
        $builder = new TreeBuilder();
27
28
        $root = $builder->root('nvm');
29
        $root
30
            ->children()
31
                ->scalarNode('install_dir')
32
                    ->defaultValue('%dotfiles.vendor_dir%/.nvm')
33
                ->end()
34
            ->end()
35
        ;
36
37
        return $builder;
38
    }
39
}
40