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::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 9.7333
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\MatomoBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
15
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
16
use Symfony\Component\Config\Definition\ConfigurationInterface;
17
18
final class Configuration implements ConfigurationInterface
19
{
20
    public function getConfigTreeBuilder()
21
    {
22
        $treeBuilder = new TreeBuilder('core23_matomo');
23
24
        // Keep compatibility with symfony/config < 4.2
25
        if (!method_exists(TreeBuilder::class, 'getRootNode')) {
26
            $rootNode = $treeBuilder->root('core23_matomo');
0 ignored issues
show
Deprecated Code introduced by
The method Symfony\Component\Config...der\TreeBuilder::root() has been deprecated with message: since Symfony 4.3, pass the root name to the constructor instead

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
27
        } else {
28
            $rootNode = $treeBuilder->getRootNode();
29
        }
30
        \assert($rootNode instanceof ArrayNodeDefinition);
31
32
        $this->addHttpClientSection($rootNode);
33
34
        return $treeBuilder;
35
    }
36
37
    private function addHttpClientSection(ArrayNodeDefinition $node): void
38
    {
39
        $node
40
            ->children()
41
                ->arrayNode('http')
42
                    ->addDefaultsIfNotSet()
43
                    ->children()
44
                        ->scalarNode('client')->defaultValue('httplug.client.default')->end()
45
                        ->scalarNode('message_factory')->defaultValue('httplug.message_factory.default')->end()
46
                    ->end()
47
                ->end()
48
            ->end()
49
        ;
50
    }
51
}
52