Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 13
c 2
b 0
f 0
dl 0
loc 21
ccs 0
cts 13
cp 0
rs 10
wmc 1

1 Method

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