Issues (5)

PiedWebConversationExtension.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace PiedWeb\ConversationBundle\DependencyInjection;
4
5
use PiedWeb\CMSBundle\DependencyInjection\PiedWebCMSExtension as Extension;
6
use Symfony\Component\Config\FileLocator;
7
//use Symfony\Component\DependencyInjection\Extension\Extension;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
10
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
11
12
class PiedWebConversationExtension extends Extension //implements PrependExtensionInterface
13
{
14
    public function load(array $configs, ContainerBuilder $container)
15
    {
16
        $configuration = $this->getConfiguration($configs, $container);
17
        $config = $this->processConfiguration($configuration, $configs);
0 ignored issues
show
It seems like $configuration 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

17
        $config = $this->processConfiguration(/** @scrutinizer ignore-type */ $configuration, $configs);
Loading history...
18
19
        self::loadConfigToParameters($container, $config, 'conversation.');
20
21
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
22
        $loader->load('services.yaml');
23
    }
24
25
    public function getAlias()
26
    {
27
        return 'piedweb_conversation';
28
    }
29
}
30