Completed
Pull Request — master (#6)
by Desjardins
01:01
created

ApiPlatformTranslationExtension   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 19
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 5 1
A getAlias() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Locastic\ApiPlatformTranslationBundle\DependencyInjection;
6
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\Config\FileLocator;
9
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
10
use Symfony\Component\DependencyInjection\Loader;
11
12
/**
13
 * This is the class that loads and manages your bundle configuration
14
 *
15
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
16
 */
17
class ApiPlatformTranslationExtension extends Extension
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function load(array $configs, ContainerBuilder $container): void
23
    {
24
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
25
        $loader->load('services.yml');
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getAlias(): string
32
    {
33
        return 'api_platform_translation';
34
    }
35
}
36