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.

OdiseoBlogExtension::load()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 7
c 1
b 0
f 0
nc 2
nop 2
dl 0
loc 13
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Odiseo\BlogBundle\DependencyInjection;
6
7
use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension;
8
use Symfony\Component\Config\FileLocator;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
11
12
/**
13
 * @author Diego D'amico <[email protected]>
14
 */
15
final class OdiseoBlogExtension extends AbstractResourceExtension
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function load(array $config, ContainerBuilder $container): void
21
    {
22
        $config = $this->processConfiguration($this->getConfiguration([], $container), $config);
0 ignored issues
show
Bug introduced by
It seems like $this->getConfiguration(array(), $container) can also be of type null; however, parameter $configuration of Symfony\Component\Depend...:processConfiguration() does only seem to accept Symfony\Component\Config...\ConfigurationInterface, maybe add an additional type check? ( Ignorable by Annotation )

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

22
        $config = $this->processConfiguration(/** @scrutinizer ignore-type */ $this->getConfiguration([], $container), $config);
Loading history...
23
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
24
25
        $this->registerResources('odiseo_blog', $config['driver'], $config['resources'], $container);
26
27
        $configFiles = [
28
            'services.yml',
29
        ];
30
31
        foreach ($configFiles as $configFile) {
32
            $loader->load($configFile);
33
        }
34
    }
35
}
36