Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 11
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 15
rs 9.9
ccs 12
cts 12
cp 1
crap 1
1
<?php
2
3
namespace Azine\EmailUpdateConfirmationBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 5
    public function getConfigTreeBuilder()
14
    {
15 5
        $treeBuilder = new TreeBuilder();
16 5
        $rootNode = $treeBuilder->root('azine_email_update_confirmation');
17
18 5
        $rootNode->children()
19 5
                ->booleanNode('enabled')->defaultTrue()->info('enable/disable email update confirmation functionality. default = true')->end()
20 5
                ->scalarNode('cypher_method')->defaultNull()->info('determines the encryption mode for encryption of email value. openssl_get_cipher_methods(false) is default value')->end()
21 5
                ->scalarNode('mailer')->defaultValue('azine.email_update.mailer')->info('mailer service to be used')->end()
22 5
                ->scalarNode('email_template')->defaultValue('@AzineEmailUpdateConfirmation/Email/email_update_confirmation.txt.twig')->info('email template')->end()
23 5
                ->scalarNode('from_email')->defaultNull()->info('`from`-address for the email. If not set, `fos_user.resetting.email.from_email` will be used')->end()
24 5
                ->scalarNode('redirect_route')->defaultValue('fos_user_profile_show')->info('route to redirect to, after the update confirmation')->end()
25 5
            ->end();
26
27 5
        return $treeBuilder;
28
    }
29
}
30