Configuration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 26
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 20 2
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the Bukashk0zzzLiipImagineSerializationBundle
4
 *
5
 * (c) Denis Golubovskiy <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Bukashk0zzz\LiipImagineSerializationBundle\DependencyInjection;
12
13
use Symfony\Component\Config\Definition\Builder\NodeParentInterface;
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * This is the configuration class
19
 */
20
class Configuration implements ConfigurationInterface
21
{
22
    /**
23
     * Generates the configuration tree.
24
     */
25
    public function getConfigTreeBuilder(): NodeParentInterface
26
    {
27
        $treeBuilder = new TreeBuilder('bukashk0zzz_liip_imagine_serialization');
28
29
        $rootNode = \method_exists($treeBuilder, 'getRootNode')
30
            ? $treeBuilder->getRootNode()
31
            : $treeBuilder->root('bukashk0zzz_liip_imagine_serialization');
0 ignored issues
show
Bug introduced by
The method root() does not seem to exist on object<Symfony\Component...on\Builder\TreeBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
32
33
        $rootNode
34
            ->children()
35
            ->scalarNode('includeHost')->defaultValue(true)->end()
36
            ->scalarNode('vichUploaderSerialize')->defaultValue(true)->end()
37
            ->scalarNode('includeOriginal')->defaultValue(false)->end()
38
            ->scalarNode('includeHostForOriginal')->defaultValue(false)->end()
39
            ->scalarNode('originUrlNormalizer')->defaultValue(null)->end()
40
            ->scalarNode('filteredUrlNormalizer')->defaultValue(null)->end()
41
        ;
42
43
        return $treeBuilder;
44
    }
45
}
46