Completed
Push — master ( e32eeb...714cda )
by
unknown
89:50 queued 46:29
created

OroTestGeneratorExtension   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 3
Metric Value
wmc 2
lcom 0
cbo 3
dl 21
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 5 5 1
A getAlias() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Oro\Bundle\TestGeneratorBundle\DependencyInjection;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\Config\FileLocator;
7
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8
use Symfony\Component\DependencyInjection\Loader;
9
10 View Code Duplication
class OroTestGeneratorExtension extends Extension
0 ignored issues
show
Duplication introduced by
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...
11
{
12
    const ALIAS = 'oro_test_generator';
13
14
    /**
15
     * {@inheritDoc}
16
     */
17
    public function load(array $configs, ContainerBuilder $container)
18
    {
19
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
20
        $loader->load('services.yml');
21
    }
22
23
    /**
24
     * {@inheritDoc}
25
     */
26
    public function getAlias()
27
    {
28
        return self::ALIAS;
29
    }
30
}
31