Passed
Push — master ( d78e5e...e129d0 )
by Ivan
02:47
created

DependencyInjection/EverlutionAjaxcomExtension.php (1 issue)

Checks if used types are declared or listed as dependencies.

Bug Major
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Everlution\AjaxcomBundle\DependencyInjection;
6
7
use Symfony\Component\Config\FileLocator;
0 ignored issues
show
The type Symfony\Component\Config\FileLocator was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\DependencyInjection\Extension\Extension;
10
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
11
12
/**
13
 * Class EverlutionAjaxcomExtension.
14
 *
15
 * @author Ivan Barlog <[email protected]>
16
 */
17
class EverlutionAjaxcomExtension extends Extension
18
{
19
    public function load(array $configs, ContainerBuilder $container)
20
    {
21
        $configuration = new Configuration();
22
        $config = $this->processConfiguration($configuration, $configs);
23
24
        $container->setParameter('everlution.ajaxcom.flash_template', $config['flash_template']);
25
        $container->setParameter('everlution.ajaxcom.flash_block_id', $config['flash_block_id']);
26
        $container->setParameter('everlution.ajaxcom.persistent_class', $config['persistent_class']);
27
        $container->setParameter('everlution.ajaxcom.blocks_to_render', $config['blocks_to_render']);
28
29
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30
        $loader->load('services.yml');
31
    }
32
}
33