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.

Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 40
ccs 28
cts 28
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 34 1
1
<?php
2
3
namespace Funstaff\RefLibRisBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Configuration
10
 *
11
 * @author Bertrand Zuchuat <[email protected]>
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18 5
    public function getConfigTreeBuilder()
19
    {
20 5
        $treeBuilder = new TreeBuilder();
21 5
        $rootNode = $treeBuilder->root('ref_lib_ris');
22
23
        $rootNode
24 5
            ->children()
25 5
                ->arrayNode('classes')
26 5
                    ->addDefaultsIfNotSet()
27 5
                    ->children()
28 5
                        ->scalarNode('ris_fields_mapping')->defaultValue('Funstaff\RefLibRis\RisFieldsMapping')->end()
29 5
                        ->scalarNode('record_processing')->defaultValue('Funstaff\RefLibRis\RecordProcessing')->end()
30 5
                        ->scalarNode('ris_definition')->defaultValue('Funstaff\RefLibRis\RisDefinition')->end()
31 5
                        ->scalarNode('ris_writer')->defaultValue('Funstaff\RefLibRis\RisWriter')->end()
32 5
                    ->end()
33 5
                ->end()
34 5
                ->arrayNode('mapping_fields')
35 5
                ->isRequired()
36 5
                ->requiresAtLeastOneElement()
37 5
                ->useAttributeAsKey('name')
38 5
                ->prototype('array')
39 5
                    ->prototype('scalar')->end()
40 5
                ->end()
41 5
                ->validate()
42 5
                ->ifTrue(function($v) {
43 4
                    return !array_key_exists('TY', $v);
44 5
                })
45 5
                ->thenInvalid('TY field is mandatory')
46 5
                ->end()
47 5
            ->end()
48
        ;
49
50 5
        return $treeBuilder;
51
    }
52
}
53