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.
Completed
Push — master ( e478ea...ae87e4 )
by Christian
02:52
created

Configuration   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 18
dl 0
loc 37
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 16 2
A addTableSection() 0 11 1
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\Doctrine\Bridge\Symfony\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
    /**
21
     * {@inheritdoc}
22
     */
23
    public function getConfigTreeBuilder()
24
    {
25
        $treeBuilder = new TreeBuilder('core23_doctrine');
26
27
        // Keep compatibility with symfony/config < 4.2
28
        if (!method_exists($treeBuilder, 'getRootNode')) {
29
            $rootNode = $treeBuilder->root('core23_doctrine');
30
        } else {
31
            $rootNode = $treeBuilder->getRootNode();
32
        }
33
34
        \assert($rootNode instanceof ArrayNodeDefinition);
35
36
        $this->addTableSection($rootNode);
37
38
        return $treeBuilder;
39
    }
40
41
    /**
42
     * @param ArrayNodeDefinition $node
43
     */
44
    private function addTableSection(ArrayNodeDefinition $node): void
45
    {
46
        $node
47
            ->children()
48
                ->arrayNode('table')
49
                    ->addDefaultsIfNotSet()
50
                    ->children()
51
                        ->scalarNode('prefix')->defaultNull()->end()
52
                    ->end()
0 ignored issues
show
Bug introduced by core23
The method end() does not exist on Symfony\Component\Config...der\NodeParentInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Symfony\Component\Config...ion\Builder\TreeBuilder. Are you sure you never get one of those? ( Ignorable by Annotation )

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

52
                    ->/** @scrutinizer ignore-call */ end()
Loading history...
53
                ->end()
54
            ->end()
55
        ;
56
    }
57
}
58