Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 20 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VideoGamesRecords\IgdbBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
/**
11
 * This is the class that validates and merges configuration from your app/config files.
12
 *
13
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
14
 */
15
class Configuration implements ConfigurationInterface
16
{
17
    /**
18
     * @return TreeBuilder
19
     */
20
    public function getConfigTreeBuilder(): TreeBuilder
21
    {
22
        $treeBuilder = new TreeBuilder('video_games_records_igdb');
23
        $rootNode = $treeBuilder->getRootNode();
24
25
        $rootNode
26
            ->children()
27
                ->scalarNode('client_id')
28
                    ->isRequired()
29
                    ->cannotBeEmpty()
30
                    ->info('IGDB API client ID')
31
                ->end()
32
                ->scalarNode('client_secret')
0 ignored issues
show
Bug introduced by
The method scalarNode() does not exist on Symfony\Component\Config...der\NodeParentInterface. It seems like you code against a sub-type of Symfony\Component\Config...der\NodeParentInterface such as Symfony\Component\Config...ion\Builder\NodeBuilder. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

32
                ->/** @scrutinizer ignore-call */ scalarNode('client_secret')
Loading history...
33
                    ->isRequired()
34
                    ->cannotBeEmpty()
35
                    ->info('IGDB API client secret')
36
                ->end()
37
            ->end();
38
39
        return $treeBuilder;
40
    }
41
}
42