Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 14
c 1
b 0
f 0
dl 0
loc 23
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 18 1
1
<?php
2
3
namespace Azine\JsCryptoStoreBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Define the possible configuration settings for the config.yml/.xml.
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function getConfigTreeBuilder()
17
    {
18
        $treeBuilder = new TreeBuilder();
19
        $rootNode = $treeBuilder->root('azine_js_crypto_store');
20
21
        $rootNode->children()
22
            ->scalarNode('ownerProvider')->defaultValue('Azine\JsCryptoStoreBundle\Service\DefaultOwnerProvider')->info('Service used to get the ownerId (e.g. the current user id) to associate uploaded files with the current user.')->end()
23
24
            ->scalarNode('encryptionCipher')->defaultValue('aes')->info('Encryption Ciper Algorythm. Default: aes')->end()
25
            ->scalarNode('encryptionMode')->defaultValue('gcm')->info("Encryption Mode. Default: 'gcm' (Galois/Counter mode)")->end()
26
            ->integerNode('encryptionIterations')->defaultValue(1000)->info('Encryption Key Hash-Iterations. Default: 1000')->end()
27
            ->integerNode('encryptionKs')->defaultValue(256)->info('KS. Default: 256')->end()
28
            ->integerNode('encryptionTs')->defaultValue(128)->info('TS. Default: 128')->end()
29
            ->scalarNode('defaultLifeTime')->defaultValue('14 days')->info("Default expiry time/date for documents. Format: input for DateTime(). Default: '14 days'")->end()
30
            ->integerNode('maxFileSize')->defaultValue(50000000)->info("Maximum file size in bytes for the encryption. Default: 50'000'000 = 50mb")->end()
31
        ->end();
32
33
        return $treeBuilder;
34
    }
35
}
36