Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 17 1
1
<?php
2
3
namespace Evheniy\MaterializeBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Class Configuration
10
 * @package Evheniy\MaterializeBundle\DependencyInjection
11
 */
12
class Configuration implements ConfigurationInterface
13
{
14
    /**
15
     * @return TreeBuilder
16
     */
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder();
20
        $rootNode = $treeBuilder->root('materialize');
21
        $rootNode
22
            ->children()
23
                ->scalarNode('version')->defaultValue('0.97.0')->end()
24
                ->scalarNode('local_cdn')->defaultValue('')->end()
25
                ->scalarNode('local_js')->defaultValue('@MaterializeBundle/Resources/public/js/materialize.min.js')->end()
26
                ->scalarNode('local_fonts_dir')->defaultValue('@MaterializeBundle/Resources/public/fonts/')->end()
27
                ->scalarNode('local_css')->defaultValue('@MaterializeBundle/Resources/public/css/materialize.min.css')->end()
28
                ->booleanNode('html5')->defaultTrue()->end()
29
                ->booleanNode('async')->defaultFalse()->end()
30
            ->end();
31
32
        return $treeBuilder;
33
    }
34
}