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 ( 780712...bc7eb6 )
by Christian
09:30
created

Configuration::addRoutingSection()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 27
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 24
nc 1
nop 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\FacebookBundle\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();
26
27
        /** @var ArrayNodeDefinition $node */
28
        $node = $treeBuilder->root('core23_facebook');
29
30
        $this->addApiSection($node);
31
32
        return $treeBuilder;
33
    }
34
35
    /**
36
     * @param ArrayNodeDefinition $node
37
     */
38
    private function addApiSection(ArrayNodeDefinition $node): void
39
    {
40
        $node
41
            ->children()
42
                ->arrayNode('api')
43
                    ->addDefaultsIfNotSet()
44
                    ->children()
45
                        ->scalarNode('app_id')->isRequired()->end()
46
                        ->scalarNode('app_secret')->isRequired()->end()
47
                        ->arrayNode('permissions')
48
                            ->prototype('scalar')->end()
49
                            ->defaultValue(['public_profile', 'user_likes'])
50
                        ->end()
51
                    ->end()
52
                ->end()
53
            ->end()
54
            ;
55
    }
56
}
57