Completed
Push — master ( 3f65c6...83b473 )
by Vincent
02:48
created

InvalidConfiguration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
c 2
b 1
f 0
lcom 0
cbo 4
dl 0
loc 25
rs 10
1
<?php
2
3
/**
4
 * Copyright 2016 Inneair
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 *
18
 * @license http://www.apache.org/licenses/LICENSE-2.0.html Apache-2.0
19
 */
20
21
namespace Inneair\TransactionBundle\Test\DependencyInjection\Fixture;
22
23
use Inneair\TransactionBundle\DependencyInjection\Configuration;
24
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
25
26
/**
27
 * This class validates and merges configuration from the app/config files.
28
 */
29
class InvalidConfiguration extends Configuration
30
{
31
    /**
32
     * {@inheritDoc}
33
     */
34
    public function getConfigTreeBuilder()
35
    {
36
        $treeBuilder = new TreeBuilder();
37
        $rootNode = $treeBuilder->root(static::ROOT_NODE_NAME);
38
        $rootNode->children()
39
            ->booleanNode(static::STRICT_MODE)
40
                ->defaultFalse()
41
                ->end()
42
            ->scalarNode(static::DEFAULT_POLICY)
43
                ->defaultNull()
44
                ->end()
45
            ->arrayNode(static::NO_ROLLBACK_EXCEPTIONS)
46
                ->prototype('scalar')
47
                ->cannotBeEmpty()
48
                ->end()
49
            ->end();
50
51
        return $treeBuilder;
52
    }
53
}
54