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.
Test Setup Failed
Push — master ( 78f8b7...0f754d )
by Elemér
04:15
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 65
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 57 1
1
<?php
2
3
namespace Erelke\TwigSpreadsheetBundle\DependencyInjection;
4
5
use RuntimeException;
6
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
7
use Symfony\Component\Config\Definition\ConfigurationInterface;
8
9
/**
10
 * Class Configuration.
11
 */
12
class Configuration implements ConfigurationInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     *
17
     * @throws RuntimeException
18
     */
19
    public function getConfigTreeBuilder()
20
    {
21
	    $treeBuilder = new TreeBuilder('erelke_twig_spreadsheet');
22
        $rootNode = $treeBuilder->getRootNode();
23
24
        $rootNode
25
            ->children()
26
                ->booleanNode('pre_calculate_formulas')
27
                    ->defaultTrue()
28
                    ->info('Disabling formula calculations can improve the performance but the resulting documents won\'t immediately show formula results in external programs.')
29
                ->end()
30
                ->arrayNode('cache')
31
                    ->addDefaultsIfNotSet()
32
                    ->children()
33
                        ->scalarNode('bitmap')
34
                            ->defaultValue('%kernel.cache_dir%/spreadsheet/bitmap')
35
                            ->cannotBeEmpty()
36
                            ->info('Using a bitmap cache is necessary, PhpSpreadsheet supports only local files.')
37
                        ->end()
38
                        ->scalarNode('xml')
39
                            ->defaultFalse()
40
                            ->example('"%kernel.cache_dir%/spreadsheet/xml"')
41
                            ->info('Using XML caching can improve memory consumption by writing data to disk. Works only for .xlsx and .ods documents.')
42
                        ->end()
43
                    ->end()
44
                ->end()
45
                ->arrayNode('csv_writer')
46
                    ->addDefaultsIfNotSet()
47
                    ->info('See PhpOffice\PhpSpreadsheet\Writer\Csv.php for more information.')
48
                    ->children()
49
                        ->scalarNode('delimiter')
50
                            ->defaultValue(',')
51
                        ->end()
52
                        ->scalarNode('enclosure')
53
                            ->defaultValue('"')
54
                        ->end()
55
                        ->booleanNode('excel_compatibility')
56
                            ->defaultFalse()
57
                        ->end()
58
                        ->booleanNode('include_separator_line')
59
                            ->defaultFalse()
60
                        ->end()
61
                        ->scalarNode('line_ending')
62
                            ->defaultValue(PHP_EOL)
63
                        ->end()
64
                        ->integerNode('sheet_index')
65
                            ->defaultValue(0)
66
                        ->end()
67
                        ->booleanNode('use_bom')
68
                            ->defaultFalse()
69
                        ->end()
70
                    ->end()
71
                ->end()
72
            ->end();
73
74
        return $treeBuilder;
75
    }
76
}
77