Completed
Push — master ( a18731...e2e070 )
by
unknown
99:54 queued 47:45
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 31 1
1
<?php
2
3
namespace OroCRM\Bundle\SalesBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
use Oro\Bundle\ConfigBundle\DependencyInjection\SettingsBuilder;
9
10
class Configuration implements ConfigurationInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function getConfigTreeBuilder()
16
    {
17
        $treeBuilder = new TreeBuilder();
18
        $rootNode = $treeBuilder->root('oro_crm_sales');
19
20
        // Here you should define the parameters that are allowed to
21
        // configure your bundle. See the documentation linked above for
22
        // more information on that topic.
23
24
        $defaults = [
25
            'in_progress'               => 0,
26
            'identification_alignment'  => 0.1,
27
            'needs_analysis'            => 0.2,
28
            'solution_development'      => 0.5,
29
            'negotiation'               => 0.8,
30
            'won'                       => 1,
31
            'lost'                      => 0,
32
        ];
33
34
        SettingsBuilder::append(
35
            $rootNode,
36
            [
37
                'default_opportunity_probabilities' => [
38
                    'value' => $defaults,
39
                    'type' => 'array',
40
                ],
41
            ]
42
        );
43
44
        return $treeBuilder;
45
    }
46
}
47