Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 12
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 19
ccs 0
cts 13
cp 0
crap 2
rs 9.8666
1
<?php
2
3
/**
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types=1);
9
10
namespace ChampsLibres\WopiBundle\DependencyInjection;
11
12
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
13
use Symfony\Component\Config\Definition\ConfigurationInterface;
14
15
final class Configuration implements ConfigurationInterface
16
{
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder('wopi');
20
21
        /** @var \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $rootNode */
22
        $rootNode = $treeBuilder->getRootNode();
23
24
        /** @phpstan-ignore-next-line */
25
        $rootNode
26
            ->children()
27
            ->scalarNode('server')->end()
28
            ->scalarNode('access_token_ttl')->end()
0 ignored issues
show
Bug introduced by
The method scalarNode() does not exist on Symfony\Component\Config...der\NodeParentInterface. It seems like you code against a sub-type of Symfony\Component\Config...der\NodeParentInterface such as Symfony\Component\Config...ion\Builder\NodeBuilder. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
            ->/** @scrutinizer ignore-call */ scalarNode('access_token_ttl')->end()
Loading history...
29
            ->enumNode('version_management')->values(['version', 'timestamp'])
30
            ->info('Manager document versioning through version (Office 365) or last modified time (Collabora Online, CODE, etc.)')
31
            ->defaultValue('timestamp')
32
            ->end()
33
            ->end();
34
35
        return $treeBuilder;
36
    }
37
}
38