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 (#31)
by Maximilian
02:46
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 6
Bugs 1 Features 1
Metric Value
wmc 1
c 6
b 1
f 1
lcom 0
cbo 3
dl 0
loc 58
rs 10
ccs 41
cts 41
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 52 1
1
<?php
2
3
namespace Ma27\ApiKeyAuthenticationBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
8
9
/**
10
 * This is the class that validates and merges configuration from your app/config files.
11
 *
12
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
13
 */
14
class Configuration implements ConfigurationInterface
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19 10
    public function getConfigTreeBuilder()
20
    {
21 10
        $treeBuilder = new TreeBuilder();
22 10
        $rootNode = $treeBuilder->root('ma27_api_key_authentication');
23
24
        $rootNode
25 10
            ->children()
26 10
                ->arrayNode('user')
27 10
                    ->children()
28 10
                        ->integerNode('api_key_length')
29 10
                            ->min(50)
30 10
                            ->defaultValue(200)
31 10
                        ->end()
32 10
                        ->scalarNode('object_manager')->isRequired()->end()
33 10
                        ->scalarNode('model_name')->defaultValue('AppBundle:User')->end()
34 10
                        ->arrayNode('password')
35 10
                            ->children()
36
                                ->scalarNode('strategy')
37
                                    ->validate()
38 9
                                        ->ifNotInArray(array('php55', 'crypt', 'sha512', 'phpass'))
39 9
                                        ->thenInvalid(
40 9
                                            'Invalid password strategy "%s"! '
41
                                            .'Allowed strategies are "password", "crypt", "sha512", "phpass"!'
42 9
                                        )
43 1
                                    ->end()
44
                                ->end()
45
                                ->integerNode('phpass_iteration_length')
46 8
                                    ->defaultValue(8)
47 1
                                ->end()
48 1
                            ->end()
49 1
                        ->end()
50 1
                    ->end()
51
                ->end()
52 1
                ->arrayNode('api_key_purge')
53
                    ->canBeEnabled()
54 1
                    ->children()
55 1
                        ->booleanNode('log_state')->defaultFalse()->end()
56 1
                        ->scalarNode('logger_service')->defaultValue('logger')->end()
57 1
                    ->end()
58 1
                ->end()
59 1
                ->arrayNode('services')
60
                    ->addDefaultsIfNotSet()
61
                    ->children()
62 7
                        ->scalarNode('auth_handler')->defaultNull()->end()
63 10
                        ->scalarNode('key_factory')->defaultNull()->end()
64 10
                        ->scalarNode('password_hasher')->defaultNull()->end()
65 10
                    ->end()
66 10
                ->end()
67 10
            ->end();
68 10
69 10
        return $treeBuilder;
70 10
    }
71
}
72