Completed
Push — master ( 265a2d...f9e310 )
by jerome
05:38 queued 02:58
created

CoreBundle/DependencyInjection/DPCoreExtension.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * This file is part of Dedipanel project
5
 *
6
 * (c) 2010-2015 Dedipanel <http://www.dedicated-panel.net>
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 DP\Core\CoreBundle\DependencyInjection;
13
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
use Symfony\Component\Config\FileLocator;
16
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
17
use Symfony\Component\DependencyInjection\Loader;
18
19 View Code Duplication
class DPCoreExtension extends Extension
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
{
21
    /**
22
     * {@inheritDoc}
23
     */
24
    public function load(array $configs, ContainerBuilder $container)
25
    {
26
        $configuration = new Configuration();
27
        $config = $this->processConfiguration($configuration, $configs);
28
29
        $container->setParameter('dedipanel.version', $config['version'] ?: '0.0.0');
30
31
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
32
        $loader->load('services.yml');
33
    }
34
}
35