Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 22

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 16
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 22
ccs 16
cts 16
cp 1
rs 9.568
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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