Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 16 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Damax\Services\Client\Bridge\Symfony\Bundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
final class Configuration implements ConfigurationInterface
11
{
12
    public function getConfigTreeBuilder(): TreeBuilder
13
    {
14
        $treeBuilder = new TreeBuilder('damax_services_client');
15
16
        $rootNode = $treeBuilder->getRootNode();
17
        $rootNode
18
            ->children()
19
                ->scalarNode('api_key')->isRequired()->end()
20
                ->scalarNode('endpoint')
21
                    ->cannotBeEmpty()
22
                    ->defaultValue('https://api.damax.solutions/services')
23
                ->end()
24
            ->end()
25
        ;
26
27
        return $treeBuilder;
28
    }
29
}
30