StrategiesDefinition   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 49
ccs 24
cts 24
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B getChildren() 0 31 1
1
<?php
2
3
/*
4
 * This file is part of Rocketeer
5
 *
6
 * (c) Maxime Fabre <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 */
12
13
namespace Rocketeer\Services\Config\Definition;
14
15
use Symfony\Component\Config\Definition\TreeBuilder\NodeBuilder;
16
17
/**
18
 * Configuration schema for the strategies node.
19
 */
20
class StrategiesDefinition extends AbstractDefinition
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $name = 'strategies';
26
27
    /**
28
     * @var string
29
     */
30
    protected $description = 'Here you can configure in a modular way which tasks to use to execute various core parts of your deployment\'s flow';
31
32
    /**
33
     * @param NodeBuilder $node
34
     *
35
     * @return NodeBuilder
36
     */
37 21
    protected function getChildren(NodeBuilder $node)
38
    {
39
        return $node
40 21
            ->scalarNode('check')
41 21
                ->info('Which strategy to use to check the server')
42 21
                ->defaultValue('Polyglot')
43 21
            ->end()
44 21
            ->scalarNode('create-release')
45 21
                ->info('Which strategy to use to create a new release and prepare its dependencies')
46 21
                ->defaultValue('Clone')
47 21
            ->end()
48 21
            ->scalarNode('deploy')
49 21
                ->info('Which strategy to use to send a release online')
50 21
                ->defaultValue('Rolling')
51 21
            ->end()
52 21
            ->scalarNode('rollback')
53 21
                ->info('Which strategy to use to rollback to a previous release')
54 21
                ->defaultValue('Rolling')
55 21
            ->end()
56 21
            ->scalarNode('test')
57 21
                ->info('Which strategy to use to test your application')
58 21
                ->defaultValue('Phpunit')
59 21
            ->end()
60 21
            ->scalarNode('migrate')
61 21
                ->info('Which strategy to use to migrate your database')
62 21
            ->end()
63
            ->scalarNode('dependencies')
64
                ->info("Which strategy to use to install your application's dependencies")
65
                ->defaultValue('Polyglot')
66
            ->end();
67
    }
68
}
69