GravitonJsonSchemaExtension::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * GravitonJsonSchemaExtension class file
4
 */
5
6
namespace Graviton\JsonSchemaBundle\DependencyInjection;
7
8
use Symfony\Component\Config\FileLocator;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
use Symfony\Component\DependencyInjection\Extension\Extension;
11
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
12
13
/**
14
 * JSON schema extension
15
 *
16
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
17
 * @license  https://opensource.org/licenses/MIT MIT License
18
 * @link     http://swisscom.ch
19
 */
20
class GravitonJsonSchemaExtension extends Extension
21
{
22
    /**
23
     * Loads a specific configuration.
24
     *
25
     * @param array            $configs   An array of configuration values
26
     * @param ContainerBuilder $container A ContainerBuilder instance
27
     * @return void
28
     */
29
    public function load(array $configs, ContainerBuilder $container)
30
    {
31
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
32
        $loader->load('services.xml');
33
    }
34
}
35