ErrorResponseExtension   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 8 1
A getAlias() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of the bugloos/error-response-bundle project.
5
 * (c) Bugloos <https://bugloos.com/>
6
 * For the full copyright and license information, please view
7
 * the LICENSE file that was distributed with this source code.
8
 */
9
10
namespace Bugloos\ErrorResponseBundle\DependencyInjection;
11
12
use Symfony\Component\Config\FileLocator;
13
use Symfony\Component\DependencyInjection\ContainerBuilder;
14
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
15
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
16
17
/**
18
 * @author Mojtaba Gheytasi <[email protected]>
19
 */
20
class ErrorResponseExtension extends Extension
21
{
22
    public function load(array $configs, ContainerBuilder $container)
23
    {
24
        $loader = new YamlFileLoader(
25
            $container,
26
            new FileLocator(__DIR__.'/../Resources/config')
27
        );
28
29
        $loader->load('services.yaml');
30
    }
31
32
    public function getAlias(): string
33
    {
34
        return 'bugloos_error_response';
35
    }
36
}
37