Issues (16)

src/DependencyInjection/Configuration.php (1 issue)

Labels
Severity
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2018 Spomky-Labs
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
namespace U2FAuthentication\Bundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
class Configuration implements ConfigurationInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function getConfigTreeBuilder()
23
    {
24
        $treeBuilder = new TreeBuilder();
25
        $rootNode = $treeBuilder->root('u2f');
26
27
        $rootNode
28
            ->addDefaultsIfNotSet()
0 ignored issues
show
The method addDefaultsIfNotSet() does not exist on Symfony\Component\Config...\Builder\NodeDefinition. It seems like you code against a sub-type of Symfony\Component\Config...\Builder\NodeDefinition such as Symfony\Component\Config...der\ArrayNodeDefinition. ( Ignorable by Annotation )

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

28
            ->/** @scrutinizer ignore-call */ 
29
              addDefaultsIfNotSet()
Loading history...
29
            ->children()
30
                ->scalarNode('application_id')
31
                    ->info('The application ID')
32
                    ->isRequired()
33
                ->end()
34
                ->arrayNode('issuer_certificates')
35
                    ->info('List of paths to certificate files. If set, the registered keys must have been manufactured by the issuer of the certificates')
36
                    ->treatNullLike([])
37
                    ->treatFalseLike([])
38
                    ->scalarPrototype()->end()
39
                ->end()
40
            ->end();
41
42
        return $treeBuilder;
43
    }
44
}
45