Passed
Push — master ( 1316c5...63993c )
by Matthew
05:18
created

DependencyInjection/Configuration.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Dtc\GridBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
0 ignored issues
show
The type Symfony\Component\Config...ion\Builder\TreeBuilder was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
0 ignored issues
show
The type Symfony\Component\Config...\ConfigurationInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class Configuration implements ConfigurationInterface
9
{
10
    /**
11
     * Generates the configuration tree.
12
     *
13
     * @return TreeBuilder
14
     */
15
    public function getConfigTreeBuilder()
16
    {
17
18
        $treeBuilder = new TreeBuilder('dtc_grid');
19
20
        if (method_exists($treeBuilder, 'getRootNode')) {
21
            $rootNode = $treeBuilder->getRootNode();
22
        } else {
23
            // BC layer for symfony/config 4.1 and older
24
            $rootNode = $treeBuilder->root('dtc_grid');
25
        }
26
27
        $rootNode
28
            ->children()
29
                ->arrayNode('reflection')
30
                    ->addDefaultsIfNotSet()
31
                    ->children()
32
                        ->variableNode('allowed_entities')->defaultNull()->end()
33
                    ->end()
34
                ->end()
35
                ->arrayNode('jq_grid')
36
                    ->children()
37
                        ->variableNode('css')->end()
38
                        ->variableNode('js')->end()
39
                        ->variableNode('options')->end()
40
                        ->arrayNode('local')
41
                            ->children()
42
                                ->arrayNode('css')
43
                                    ->prototype('scalar')->end()
44
                                ->end()
45
                                ->arrayNode('js')
46
                                    ->prototype('scalar')->end()
47
                                ->end()
48
                            ->end()
49
                        ->end()
50
                    ->end()
51
                ->end()
52
                ->scalarNode('purl')
53
                    ->defaultValue('//cdnjs.cloudflare.com/ajax/libs/purl/2.3.1/purl.min.js')
54
                ->end()
55
                ->arrayNode('jquery')
56
                    ->addDefaultsIfNotSet()
57
                    ->children()
58
                        ->scalarNode('url')
59
                            ->defaultValue('//code.jquery.com/jquery-3.4.1.min.js')
60
                        ->end()
61
                        ->scalarNode('integrity')
62
                            ->defaultValue('sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=')
63
                        ->end()
64
                        ->scalarNode('crossorigin')
65
                            ->defaultValue('anonymous')
66
                        ->end()
67
                    ->end()
68
                ->end()
69
                ->arrayNode('datatables')
70
                    ->addDefaultsIfNotSet()
71
                    ->children()
72
                        ->scalarNode('class')->defaultNull()->end()
73
                        ->variableNode('css')
74
                            ->defaultValue(['//cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css'])
75
                        ->end()
76
                        ->variableNode('js')
77
                            ->defaultValue(['//cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js',
78
                                            '//cdn.datatables.net/1.10.20/js/dataTables.bootstrap.min.js', ])
79
                        ->end()
80
                        ->arrayNode('local')
81
                            ->children()
82
                                ->arrayNode('css')
83
                                    ->prototype('scalar')->end()
84
                                ->end()
85
                                ->arrayNode('js')
86
                                    ->prototype('scalar')->end()
87
                                ->end()
88
                            ->end()
89
                        ->end()
90
                        ->variableNode('options')->end()
91
                    ->end()
92
                ->end()
93
                ->arrayNode('table')
94
                    ->children()
95
                        ->variableNode('options')->end()
96
                    ->end()
97
                ->end()
98
                ->arrayNode('theme')
99
                    ->addDefaultsIfNotSet()
100
                    ->children()
101
                        ->variableNode('css')
102
                            ->defaultValue(['https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', 'https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css'])
103
                        ->end()
104
                        ->variableNode('js')
105
                            ->defaultValue(['https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js'])
106
                        ->end()
107
                    ->end()
108
                ->end()
109
                ->scalarNode('page_div_style')->defaultValue('margin: 10px')->end()
110
            ->end();
111
112
        return $treeBuilder;
113
    }
114
}
115