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

Core23FacebookExtension::configureRoutes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
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\FileLocator;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use Symfony\Component\DependencyInjection\Loader;
17
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
18
19
final class Core23FacebookExtension extends Extension
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function load(array $configs, ContainerBuilder $container): void
25
    {
26
        $configuration = new Configuration();
27
        $config        = $this->processConfiguration($configuration, $configs);
28
        $bundles       = $container->getParameter('kernel.bundles');
29
30
        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
31
        $loader->load('action.xml');
32
        $loader->load('services.xml');
33
34
        if (isset($bundles['SonataBlockBundle'])) {
35
            $loader->load('block.xml');
36
        }
37
38
        $this->configureApi($container, $config);
39
    }
40
41
    /**
42
     * @param ContainerBuilder $container
43
     * @param array            $config
44
     */
45
    private function configureApi(ContainerBuilder $container, array $config): void
46
    {
47
        $container->setParameter('core23_facebook.api.app_id', $config['api']['app_id']);
48
        $container->setParameter('core23_facebook.api.app_secret', $config['api']['app_secret']);
49
        $container->setParameter('core23_facebook.api.permissions', $config['api']['permissions']);
50
    }
51
}
52