Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 27
ccs 0
cts 19
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 21 1
1
<?php
2
3
namespace Polidog\SsrBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the class that validates and merges configuration from your app/config files.
10
 *
11
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function getConfigTreeBuilder()
19
    {
20
        $treeBuilder = new TreeBuilder();
21
        $rootNode = $treeBuilder->root('polidog_ssr');
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
22
23
        $rootNode
24
            ->children()
25
                ->scalarNode('bundle_src_path')->isRequired()->end()
26
                ->scalarNode('cache')->defaultFalse()->end()
27
                ->arrayNode('baracoa')
28
                    ->addDefaultsIfNotSet()
29
                    ->children()
30
                        ->scalarNode('object')->defaultValue('polidog_ssr.baracore')->isRequired()->end()
31
                        ->scalarNode('cache_object')->defaultValue('polidog_ssr.cache_baracore')->isRequired()->end()
32
                    ->end()
33
                ->end()
34
            ->end()
35
        ;
36
37
        return $treeBuilder;
38
    }
39
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
40