Completed
Pull Request — master (#9)
by ANTHONIUS
03:17
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 14 1
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