Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 23
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 17 1
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[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 Translation\PlatformAdapter\Flysystem\Bridge\Symfony\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * @author Tobias Nyholm <[email protected]>
19
 */
20
class Configuration implements ConfigurationInterface
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25 1
    public function getConfigTreeBuilder()
26
    {
27 1
        $treeBuilder = new TreeBuilder();
28 1
        $root = $treeBuilder->root('translation_adapter_flysystem');
29
30 1
        $root->children()
31 1
            ->arrayNode('filesystems')
32 1
            ->useAttributeAsKey('name')
33 1
            ->prototype('array')
34 1
            ->children()
35 1
                ->scalarNode('flysystem_service')->isRequired()->end()
36 1
                ->scalarNode('path')->isRequired()->end()
37 1
            ->end()
38 1
        ->end();
39
40 1
        return $treeBuilder;
41
    }
42
}
43