GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#158)
by Bernardo Vieira da
12:24
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 93
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 85 1
1
<?php
2
3
/**
4
 * Gearman Bundle for Symfony2
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
namespace Mmoreram\GearmanBundle\DependencyInjection;
15
16
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
17
use Symfony\Component\Config\Definition\ConfigurationInterface;
18
19
/**
20
 * This is the class that validates and merges configuration from your
21
 * app/config files
22
 *
23
 * @since 2.3.1
24
 */
25
class Configuration implements ConfigurationInterface
26
{
27
    /**
28
     * Generates the configuration tree builder.
29
     *
30
     * @return TreeBuilder The tree builder
31
     */
32 1
    public function getConfigTreeBuilder()
33
    {
34 1
        $treeBuilder = new TreeBuilder();
35 1
        $rootNode = $treeBuilder->root('gearman');
36
37
        $rootNode
38 1
            ->children()
39 1
                ->arrayNode('bundles')
40 1
                    ->prototype('array')
41 1
                        ->children()
42 1
                            ->scalarNode('name')
43 1
                                ->isRequired()
44 1
                                ->cannotBeEmpty()
45 1
                            ->end()
46 1
                            ->booleanNode('active')
47 1
                                ->defaultFalse()
48 1
                            ->end()
49 1
                            ->arrayNode('include')
50 1
                                ->prototype('scalar')->end()
51 1
                            ->end()
52 1
                            ->arrayNode('ignore')
53 1
                                ->prototype('scalar')->end()
54 1
                            ->end()
55 1
                        ->end()
56 1
                    ->end()
57 1
                ->end()
58 1
                ->arrayNode('resources')
59 1
                    ->scalarPrototype()->end()
60 1
                ->end()
61 1
                ->arrayNode('servers')
62 1
                    ->performNoDeepMerging()
63 1
                    ->defaultValue(array(
64 1
                        'localhost' =>  array(
65
                            'host'  =>  '127.0.0.1',
66
                            'port'  =>  '4730',
67
                        ),
68
                    ))
69 1
                    ->prototype('array')
70 1
                        ->children()
71 1
                            ->scalarNode('host')
72 1
                                ->isRequired()
73 1
                                ->cannotBeEmpty()
74 1
                            ->end()
75 1
                            ->integerNode('port')
76 1
                                ->defaultValue('4730')
77 1
                            ->end()
78 1
                        ->end()
79 1
                    ->end()
80 1
                ->end()
81 1
                ->arrayNode('defaults')
82 1
                    ->addDefaultsIfNotSet()
83 1
                    ->children()
84 1
                        ->integerNode('iterations')
85 1
                            ->min(0)
86 1
                            ->defaultValue(0)
87 1
                        ->end()
88 1
                        ->scalarNode('method')
89 1
                            ->defaultValue('doNormal')
90 1
                        ->end()
91 1
                        ->booleanNode('callbacks')
92 1
                            ->defaultTrue()
93 1
                        ->end()
94 1
                        ->scalarNode('job_prefix')
95 1
                            ->defaultNull()
96 1
                        ->end()
97 1
                        ->booleanNode('generate_unique_key')
98 1
                            ->defaultTrue()
99 1
                        ->end()
100 1
                        ->booleanNode('workers_name_prepend_namespace')
101 1
                            ->defaultTrue()
102 1
                        ->end()
103 1
                        ->integerNode('minimum_execution_time')
104 1
                            ->min(0)
105 1
                            ->defaultValue(0)
106 1
                        ->end()
107 1
                        ->integerNode('timeout')
108 1
                            ->min(0)
109 1
                            ->defaultValue(0)
110 1
                        ->end()
111 1
                    ->end()
112 1
                ->end()
113 1
            ->end();
114
115 1
        return $treeBuilder;
116
    }
117
}
118