Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 22 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Loevgaard\ConsignorShipmentServerBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
class Configuration implements ConfigurationInterface
11
{
12 2
    public function getConfigTreeBuilder()
13
    {
14 2
        $treeBuilder = new TreeBuilder();
0 ignored issues
show
Bug introduced by
The call to TreeBuilder::__construct() misses a required argument $name.

This check looks for function calls that miss required arguments.

Loading history...
15 2
        $rootNode = $treeBuilder->root('loevgaard_consignor_shipment_server');
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...
16
17
        $rootNode
18 2
            ->children()
19 2
                ->scalarNode('actor')
20 2
                    ->info('The consignor actor')
21 2
                    ->isRequired()
22 2
                    ->cannotBeEmpty()
23 2
                ->end()
24 2
                ->scalarNode('key')
25 2
                    ->info('The corresponding consignor key')
26 2
                    ->isRequired()
27 2
                    ->cannotBeEmpty()
28 2
                ->end()
29 2
            ->end()
30
        ;
31
32 2
        return $treeBuilder;
33
    }
34
}
35