Completed
Push — develop ( 4cea88...99fd65 )
by Javier
03:46
created

XgcCarbonExtension::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Xgc\CarbonBundle\DependencyInjection;
5
6
use Carbon\Carbon;
7
use Exception;
8
use Symfony\Component\Config\FileLocator;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
use Symfony\Component\DependencyInjection\Loader;
11
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
12
13
/**
14
 * Class XgcCarbonExtension
15
 * @package Xgc\CarbonBundle\DependencyInjection
16
 */
17
class XgcCarbonExtension extends Extension
18
{
19
    /**
20
     * @param array            $configs
21
     * @param ContainerBuilder $container
22
     *
23
     * @throws Exception
24
     */
25 1
    public function load(array $configs, ContainerBuilder $container): void
26
    {
27 1
        Carbon::setLocale($container->getParameter('locale'));
28 1
    }
29
30
    /**
31
     * @return string
32
     */
33 1
    public function getAlias(): string
34
    {
35 1
        return 'xgc_carbon';
36
    }
37
}
38